
com.foursoft.vecmodel.vec120.AbstractVecWireSpecificationAssert 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 VecWireSpecification} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecWireSpecificationAssert, A extends VecWireSpecification> extends AbstractVecPartOrUsageRelatedSpecificationAssert {
/**
* Creates a new {@link AbstractVecWireSpecificationAssert}
to make assertions on actual VecWireSpecification.
* @param actual the VecWireSpecification we want to make assertions on.
*/
protected AbstractVecWireSpecificationAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecWireSpecification's refWireRole contains the given VecWireRole elements.
* @param refWireRole the given elements that should be contained in actual VecWireSpecification's refWireRole.
* @return this assertion object.
* @throws AssertionError if the actual VecWireSpecification's refWireRole does not contain all given VecWireRole elements.
*/
public S hasRefWireRole(VecWireRole... refWireRole) {
// check that actual VecWireSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireRole varargs is not null.
if (refWireRole == null) failWithMessage("Expecting refWireRole 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.getRefWireRole(), refWireRole);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireSpecification's refWireRole contains the given VecWireRole elements in Collection.
* @param refWireRole the given elements that should be contained in actual VecWireSpecification's refWireRole.
* @return this assertion object.
* @throws AssertionError if the actual VecWireSpecification's refWireRole does not contain all given VecWireRole elements.
*/
public S hasRefWireRole(java.util.Collection extends VecWireRole> refWireRole) {
// check that actual VecWireSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireRole collection is not null.
if (refWireRole == null) {
failWithMessage("Expecting refWireRole 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.getRefWireRole(), refWireRole.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireSpecification's refWireRole contains only the given VecWireRole elements and nothing else in whatever order.
* @param refWireRole the given elements that should be contained in actual VecWireSpecification's refWireRole.
* @return this assertion object.
* @throws AssertionError if the actual VecWireSpecification's refWireRole does not contain all given VecWireRole elements.
*/
public S hasOnlyRefWireRole(VecWireRole... refWireRole) {
// check that actual VecWireSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireRole varargs is not null.
if (refWireRole == null) failWithMessage("Expecting refWireRole 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.getRefWireRole(), refWireRole);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireSpecification's refWireRole contains only the given VecWireRole elements in Collection and nothing else in whatever order.
* @param refWireRole the given elements that should be contained in actual VecWireSpecification's refWireRole.
* @return this assertion object.
* @throws AssertionError if the actual VecWireSpecification's refWireRole does not contain all given VecWireRole elements.
*/
public S hasOnlyRefWireRole(java.util.Collection extends VecWireRole> refWireRole) {
// check that actual VecWireSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireRole collection is not null.
if (refWireRole == null) {
failWithMessage("Expecting refWireRole 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.getRefWireRole(), refWireRole.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireSpecification's refWireRole does not contain the given VecWireRole elements.
*
* @param refWireRole the given elements that should not be in actual VecWireSpecification's refWireRole.
* @return this assertion object.
* @throws AssertionError if the actual VecWireSpecification's refWireRole contains any given VecWireRole elements.
*/
public S doesNotHaveRefWireRole(VecWireRole... refWireRole) {
// check that actual VecWireSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireRole varargs is not null.
if (refWireRole == null) failWithMessage("Expecting refWireRole parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefWireRole(), refWireRole);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireSpecification's refWireRole does not contain the given VecWireRole elements in Collection.
*
* @param refWireRole the given elements that should not be in actual VecWireSpecification's refWireRole.
* @return this assertion object.
* @throws AssertionError if the actual VecWireSpecification's refWireRole contains any given VecWireRole elements.
*/
public S doesNotHaveRefWireRole(java.util.Collection extends VecWireRole> refWireRole) {
// check that actual VecWireSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireRole collection is not null.
if (refWireRole == null) {
failWithMessage("Expecting refWireRole 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.getRefWireRole(), refWireRole.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireSpecification has no refWireRole.
* @return this assertion object.
* @throws AssertionError if the actual VecWireSpecification's refWireRole is not empty.
*/
public S hasNoRefWireRole() {
// check that actual VecWireSpecification 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 refWireRole but had :\n <%s>";
// check
if (actual.getRefWireRole().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefWireRole());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireSpecification's wireElement is equal to the given one.
* @param wireElement the given wireElement to compare the actual VecWireSpecification's wireElement to.
* @return this assertion object.
* @throws AssertionError - if the actual VecWireSpecification's wireElement is not equal to the given one.
*/
public S hasWireElement(VecWireElement wireElement) {
// check that actual VecWireSpecification we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting wireElement of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecWireElement actualWireElement = actual.getWireElement();
if (!Objects.areEqual(actualWireElement, wireElement)) {
failWithMessage(assertjErrorMessage, actual, wireElement, actualWireElement);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireSpecification's wireElementSpecification is equal to the given one.
* @param wireElementSpecification the given wireElementSpecification to compare the actual VecWireSpecification's wireElementSpecification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecWireSpecification's wireElementSpecification is not equal to the given one.
*/
public S hasWireElementSpecification(VecWireElementSpecification wireElementSpecification) {
// check that actual VecWireSpecification we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting wireElementSpecification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecWireElementSpecification actualWireElementSpecification = actual.getWireElementSpecification();
if (!Objects.areEqual(actualWireElementSpecification, wireElementSpecification)) {
failWithMessage(assertjErrorMessage, actual, wireElementSpecification, actualWireElementSpecification);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy