
com.foursoft.vecmodel.vec120.AbstractVecWireElementAssert 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 VecWireElement} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecWireElementAssert, A extends VecWireElement> extends AbstractVecExtendableElementAssert {
/**
* Creates a new {@link AbstractVecWireElementAssert}
to make assertions on actual VecWireElement.
* @param actual the VecWireElement we want to make assertions on.
*/
protected AbstractVecWireElementAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecWireElement's identification is equal to the given one.
* @param identification the given identification to compare the actual VecWireElement's identification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecWireElement's identification is not equal to the given one.
*/
public S hasIdentification(String identification) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting identification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualIdentification = actual.getIdentification();
if (!Objects.areEqual(actualIdentification, identification)) {
failWithMessage(assertjErrorMessage, actual, identification, actualIdentification);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's parentWireElement is equal to the given one.
* @param parentWireElement the given parentWireElement to compare the actual VecWireElement's parentWireElement to.
* @return this assertion object.
* @throws AssertionError - if the actual VecWireElement's parentWireElement is not equal to the given one.
*/
public S hasParentWireElement(VecWireElement parentWireElement) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentWireElement of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecWireElement actualParentWireElement = actual.getParentWireElement();
if (!Objects.areEqual(actualParentWireElement, parentWireElement)) {
failWithMessage(assertjErrorMessage, actual, parentWireElement, actualParentWireElement);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's parentWireSpecification is equal to the given one.
* @param parentWireSpecification the given parentWireSpecification to compare the actual VecWireElement's parentWireSpecification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecWireElement's parentWireSpecification is not equal to the given one.
*/
public S hasParentWireSpecification(VecWireSpecification parentWireSpecification) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentWireSpecification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecWireSpecification actualParentWireSpecification = actual.getParentWireSpecification();
if (!Objects.areEqual(actualParentWireSpecification, parentWireSpecification)) {
failWithMessage(assertjErrorMessage, actual, parentWireSpecification, actualParentWireSpecification);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's refWireElementReference contains the given VecWireElementReference elements.
* @param refWireElementReference the given elements that should be contained in actual VecWireElement's refWireElementReference.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's refWireElementReference does not contain all given VecWireElementReference elements.
*/
public S hasRefWireElementReference(VecWireElementReference... refWireElementReference) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference varargs is not null.
if (refWireElementReference == null) failWithMessage("Expecting refWireElementReference 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.getRefWireElementReference(), refWireElementReference);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's refWireElementReference contains the given VecWireElementReference elements in Collection.
* @param refWireElementReference the given elements that should be contained in actual VecWireElement's refWireElementReference.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's refWireElementReference does not contain all given VecWireElementReference elements.
*/
public S hasRefWireElementReference(java.util.Collection extends VecWireElementReference> refWireElementReference) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference collection is not null.
if (refWireElementReference == null) {
failWithMessage("Expecting refWireElementReference 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.getRefWireElementReference(), refWireElementReference.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's refWireElementReference contains only the given VecWireElementReference elements and nothing else in whatever order.
* @param refWireElementReference the given elements that should be contained in actual VecWireElement's refWireElementReference.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's refWireElementReference does not contain all given VecWireElementReference elements.
*/
public S hasOnlyRefWireElementReference(VecWireElementReference... refWireElementReference) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference varargs is not null.
if (refWireElementReference == null) failWithMessage("Expecting refWireElementReference 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.getRefWireElementReference(), refWireElementReference);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's refWireElementReference contains only the given VecWireElementReference elements in Collection and nothing else in whatever order.
* @param refWireElementReference the given elements that should be contained in actual VecWireElement's refWireElementReference.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's refWireElementReference does not contain all given VecWireElementReference elements.
*/
public S hasOnlyRefWireElementReference(java.util.Collection extends VecWireElementReference> refWireElementReference) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference collection is not null.
if (refWireElementReference == null) {
failWithMessage("Expecting refWireElementReference 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.getRefWireElementReference(), refWireElementReference.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's refWireElementReference does not contain the given VecWireElementReference elements.
*
* @param refWireElementReference the given elements that should not be in actual VecWireElement's refWireElementReference.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's refWireElementReference contains any given VecWireElementReference elements.
*/
public S doesNotHaveRefWireElementReference(VecWireElementReference... refWireElementReference) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference varargs is not null.
if (refWireElementReference == null) failWithMessage("Expecting refWireElementReference parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefWireElementReference(), refWireElementReference);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's refWireElementReference does not contain the given VecWireElementReference elements in Collection.
*
* @param refWireElementReference the given elements that should not be in actual VecWireElement's refWireElementReference.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's refWireElementReference contains any given VecWireElementReference elements.
*/
public S doesNotHaveRefWireElementReference(java.util.Collection extends VecWireElementReference> refWireElementReference) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementReference collection is not null.
if (refWireElementReference == null) {
failWithMessage("Expecting refWireElementReference 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.getRefWireElementReference(), refWireElementReference.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement has no refWireElementReference.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's refWireElementReference is not empty.
*/
public S hasNoRefWireElementReference() {
// check that actual VecWireElement 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 refWireElementReference but had :\n <%s>";
// check
if (actual.getRefWireElementReference().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefWireElementReference());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's subWireElements contains the given VecWireElement elements.
* @param subWireElements the given elements that should be contained in actual VecWireElement's subWireElements.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's subWireElements does not contain all given VecWireElement elements.
*/
public S hasSubWireElements(VecWireElement... subWireElements) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElement varargs is not null.
if (subWireElements == null) failWithMessage("Expecting subWireElements 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.getSubWireElements(), subWireElements);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's subWireElements contains the given VecWireElement elements in Collection.
* @param subWireElements the given elements that should be contained in actual VecWireElement's subWireElements.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's subWireElements does not contain all given VecWireElement elements.
*/
public S hasSubWireElements(java.util.Collection extends VecWireElement> subWireElements) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElement collection is not null.
if (subWireElements == null) {
failWithMessage("Expecting subWireElements 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.getSubWireElements(), subWireElements.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's subWireElements contains only the given VecWireElement elements and nothing else in whatever order.
* @param subWireElements the given elements that should be contained in actual VecWireElement's subWireElements.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's subWireElements does not contain all given VecWireElement elements.
*/
public S hasOnlySubWireElements(VecWireElement... subWireElements) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElement varargs is not null.
if (subWireElements == null) failWithMessage("Expecting subWireElements 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.getSubWireElements(), subWireElements);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's subWireElements contains only the given VecWireElement elements in Collection and nothing else in whatever order.
* @param subWireElements the given elements that should be contained in actual VecWireElement's subWireElements.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's subWireElements does not contain all given VecWireElement elements.
*/
public S hasOnlySubWireElements(java.util.Collection extends VecWireElement> subWireElements) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElement collection is not null.
if (subWireElements == null) {
failWithMessage("Expecting subWireElements 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.getSubWireElements(), subWireElements.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's subWireElements does not contain the given VecWireElement elements.
*
* @param subWireElements the given elements that should not be in actual VecWireElement's subWireElements.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's subWireElements contains any given VecWireElement elements.
*/
public S doesNotHaveSubWireElements(VecWireElement... subWireElements) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElement varargs is not null.
if (subWireElements == null) failWithMessage("Expecting subWireElements parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getSubWireElements(), subWireElements);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's subWireElements does not contain the given VecWireElement elements in Collection.
*
* @param subWireElements the given elements that should not be in actual VecWireElement's subWireElements.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's subWireElements contains any given VecWireElement elements.
*/
public S doesNotHaveSubWireElements(java.util.Collection extends VecWireElement> subWireElements) {
// check that actual VecWireElement we want to make assertions on is not null.
isNotNull();
// check that given VecWireElement collection is not null.
if (subWireElements == null) {
failWithMessage("Expecting subWireElements 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.getSubWireElements(), subWireElements.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement has no subWireElements.
* @return this assertion object.
* @throws AssertionError if the actual VecWireElement's subWireElements is not empty.
*/
public S hasNoSubWireElements() {
// check that actual VecWireElement 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 subWireElements but had :\n <%s>";
// check
if (actual.getSubWireElements().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getSubWireElements());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecWireElement's wireElementSpecification is equal to the given one.
* @param wireElementSpecification the given wireElementSpecification to compare the actual VecWireElement's wireElementSpecification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecWireElement's wireElementSpecification is not equal to the given one.
*/
public S hasWireElementSpecification(VecWireElementSpecification wireElementSpecification) {
// check that actual VecWireElement 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