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