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