
com.foursoft.vecmodel.vec120.AbstractVecIECUnitAssert 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 VecIECUnit} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecIECUnitAssert, A extends VecIECUnit> extends AbstractVecUnitAssert {
/**
* Creates a new {@link AbstractVecIECUnitAssert}
to make assertions on actual VecIECUnit.
* @param actual the VecIECUnit we want to make assertions on.
*/
protected AbstractVecIECUnitAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecIECUnit's iecPrefix is equal to the given one.
* @param iecPrefix the given iecPrefix to compare the actual VecIECUnit's iecPrefix to.
* @return this assertion object.
* @throws AssertionError - if the actual VecIECUnit's iecPrefix is not equal to the given one.
*/
public S hasIecPrefix(VecIECPrefix iecPrefix) {
// check that actual VecIECUnit we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting iecPrefix of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecIECPrefix actualIecPrefix = actual.getIecPrefix();
if (!Objects.areEqual(actualIecPrefix, iecPrefix)) {
failWithMessage(assertjErrorMessage, actual, iecPrefix, actualIecPrefix);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecIECUnit's iecUnitName is equal to the given one.
* @param iecUnitName the given iecUnitName to compare the actual VecIECUnit's iecUnitName to.
* @return this assertion object.
* @throws AssertionError - if the actual VecIECUnit's iecUnitName is not equal to the given one.
*/
public S hasIecUnitName(VecIECUnitName iecUnitName) {
// check that actual VecIECUnit we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting iecUnitName of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecIECUnitName actualIecUnitName = actual.getIecUnitName();
if (!Objects.areEqual(actualIecUnitName, iecUnitName)) {
failWithMessage(assertjErrorMessage, actual, iecUnitName, actualIecUnitName);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy