
com.foursoft.vecmodel.vec120.AbstractVecCodingAssert 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.util.Objects;
/**
* Abstract base class for {@link VecCoding} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecCodingAssert, A extends VecCoding> extends AbstractVecExtendableElementAssert {
/**
* Creates a new {@link AbstractVecCodingAssert}
to make assertions on actual VecCoding.
* @param actual the VecCoding we want to make assertions on.
*/
protected AbstractVecCodingAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecCoding's coding is equal to the given one.
* @param coding the given coding to compare the actual VecCoding's coding to.
* @return this assertion object.
* @throws AssertionError - if the actual VecCoding's coding is not equal to the given one.
*/
public S hasCoding(String coding) {
// check that actual VecCoding we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting coding of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualCoding = actual.getCoding();
if (!Objects.areEqual(actualCoding, coding)) {
failWithMessage(assertjErrorMessage, actual, coding, actualCoding);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecCoding's parentAbstractSlot is equal to the given one.
* @param parentAbstractSlot the given parentAbstractSlot to compare the actual VecCoding's parentAbstractSlot to.
* @return this assertion object.
* @throws AssertionError - if the actual VecCoding's parentAbstractSlot is not equal to the given one.
*/
public S hasParentAbstractSlot(VecAbstractSlot parentAbstractSlot) {
// check that actual VecCoding we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentAbstractSlot of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecAbstractSlot actualParentAbstractSlot = actual.getParentAbstractSlot();
if (!Objects.areEqual(actualParentAbstractSlot, parentAbstractSlot)) {
failWithMessage(assertjErrorMessage, actual, parentAbstractSlot, actualParentAbstractSlot);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecCoding's parentConnectorHousingSpecification is equal to the given one.
* @param parentConnectorHousingSpecification the given parentConnectorHousingSpecification to compare the actual VecCoding's parentConnectorHousingSpecification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecCoding's parentConnectorHousingSpecification is not equal to the given one.
*/
public S hasParentConnectorHousingSpecification(VecConnectorHousingSpecification parentConnectorHousingSpecification) {
// check that actual VecCoding we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentConnectorHousingSpecification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecConnectorHousingSpecification actualParentConnectorHousingSpecification = actual.getParentConnectorHousingSpecification();
if (!Objects.areEqual(actualParentConnectorHousingSpecification, parentConnectorHousingSpecification)) {
failWithMessage(assertjErrorMessage, actual, parentConnectorHousingSpecification, actualParentConnectorHousingSpecification);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy