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