
com.foursoft.vecmodel.vec120.AbstractVecWireRoleAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vec120-assertions Show documentation
Show all versions of vec120-assertions Show documentation
The Assertions Library for VEC version 1.2.0.
package com.foursoft.vecmodel.vec120;
import org.assertj.core.internal.Iterables;
import org.assertj.core.util.Objects;
/**
* Abstract base class for {@link VecWireRole} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecWireRoleAssert, A extends VecWireRole> extends AbstractVecRoleAssert {
/**
* Creates a new {@link AbstractVecWireRoleAssert}
to make assertions on actual VecWireRole.
* @param actual the VecWireRole we want to make assertions on.
*/
protected AbstractVecWireRoleAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecWireRole's wireElementReferences contains the given VecWireElementReference elements.
* @param wireElementReferences the given elements that should be contained in actual VecWireRole's wireElementReferences.
* @return this assertion object.
* @throws AssertionError if the actual VecWireRole's wireElementReferences does not contain all given VecWireElementReference elements.
*/
public S hasWireElementReferences(VecWireElementReference... wireElementReferences) {
// check that actual VecWireRole we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference varargs is not null.
if (wireElementReferences == null) failWithMessage("Expecting wireElementReferences parameter not to be null.");
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
Iterables.instance().assertContains(info, actual.getWireElementReferences(), wireElementReferences);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireRole's wireElementReferences contains the given VecWireElementReference elements in Collection.
* @param wireElementReferences the given elements that should be contained in actual VecWireRole's wireElementReferences.
* @return this assertion object.
* @throws AssertionError if the actual VecWireRole's wireElementReferences does not contain all given VecWireElementReference elements.
*/
public S hasWireElementReferences(java.util.Collection extends VecWireElementReference> wireElementReferences) {
// check that actual VecWireRole we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference collection is not null.
if (wireElementReferences == null) {
failWithMessage("Expecting wireElementReferences parameter not to be null.");
return myself; // to fool Eclipse "Null pointer access" warning on toArray.
}
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
Iterables.instance().assertContains(info, actual.getWireElementReferences(), wireElementReferences.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireRole's wireElementReferences contains only the given VecWireElementReference elements and nothing else in whatever order.
* @param wireElementReferences the given elements that should be contained in actual VecWireRole's wireElementReferences.
* @return this assertion object.
* @throws AssertionError if the actual VecWireRole's wireElementReferences does not contain all given VecWireElementReference elements.
*/
public S hasOnlyWireElementReferences(VecWireElementReference... wireElementReferences) {
// check that actual VecWireRole we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference varargs is not null.
if (wireElementReferences == null) failWithMessage("Expecting wireElementReferences parameter not to be null.");
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
Iterables.instance().assertContainsOnly(info, actual.getWireElementReferences(), wireElementReferences);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireRole's wireElementReferences contains only the given VecWireElementReference elements in Collection and nothing else in whatever order.
* @param wireElementReferences the given elements that should be contained in actual VecWireRole's wireElementReferences.
* @return this assertion object.
* @throws AssertionError if the actual VecWireRole's wireElementReferences does not contain all given VecWireElementReference elements.
*/
public S hasOnlyWireElementReferences(java.util.Collection extends VecWireElementReference> wireElementReferences) {
// check that actual VecWireRole we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference collection is not null.
if (wireElementReferences == null) {
failWithMessage("Expecting wireElementReferences parameter not to be null.");
return myself; // to fool Eclipse "Null pointer access" warning on toArray.
}
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
Iterables.instance().assertContainsOnly(info, actual.getWireElementReferences(), wireElementReferences.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireRole's wireElementReferences does not contain the given VecWireElementReference elements.
*
* @param wireElementReferences the given elements that should not be in actual VecWireRole's wireElementReferences.
* @return this assertion object.
* @throws AssertionError if the actual VecWireRole's wireElementReferences contains any given VecWireElementReference elements.
*/
public S doesNotHaveWireElementReferences(VecWireElementReference... wireElementReferences) {
// check that actual VecWireRole we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference varargs is not null.
if (wireElementReferences == null) failWithMessage("Expecting wireElementReferences parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getWireElementReferences(), wireElementReferences);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireRole's wireElementReferences does not contain the given VecWireElementReference elements in Collection.
*
* @param wireElementReferences the given elements that should not be in actual VecWireRole's wireElementReferences.
* @return this assertion object.
* @throws AssertionError if the actual VecWireRole's wireElementReferences contains any given VecWireElementReference elements.
*/
public S doesNotHaveWireElementReferences(java.util.Collection extends VecWireElementReference> wireElementReferences) {
// check that actual VecWireRole we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference collection is not null.
if (wireElementReferences == null) {
failWithMessage("Expecting wireElementReferences parameter not to be null.");
return myself; // to fool Eclipse "Null pointer access" warning on toArray.
}
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getWireElementReferences(), wireElementReferences.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireRole has no wireElementReferences.
* @return this assertion object.
* @throws AssertionError if the actual VecWireRole's wireElementReferences is not empty.
*/
public S hasNoWireElementReferences() {
// check that actual VecWireRole we want to make assertions on is not null.
isNotNull();
// we override the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting :\n <%s>\nnot to have wireElementReferences but had :\n <%s>";
// check
if (actual.getWireElementReferences().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getWireElementReferences());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireRole's wireSpecification is equal to the given one.
* @param wireSpecification the given wireSpecification to compare the actual VecWireRole's wireSpecification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecWireRole's wireSpecification is not equal to the given one.
*/
public S hasWireSpecification(VecWireSpecification wireSpecification) {
// check that actual VecWireRole we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting wireSpecification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecWireSpecification actualWireSpecification = actual.getWireSpecification();
if (!Objects.areEqual(actualWireSpecification, wireSpecification)) {
failWithMessage(assertjErrorMessage, actual, wireSpecification, actualWireSpecification);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy