
com.foursoft.vecmodel.vec120.AbstractVecSizeAssert 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.api.AbstractObjectAssert;
import org.assertj.core.util.Objects;
/**
* Abstract base class for {@link VecSize} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecSizeAssert, A extends VecSize> extends AbstractObjectAssert {
/**
* Creates a new {@link AbstractVecSizeAssert}
to make assertions on actual VecSize.
* @param actual the VecSize we want to make assertions on.
*/
protected AbstractVecSizeAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecSize's height is equal to the given one.
* @param height the given height to compare the actual VecSize's height to.
* @return this assertion object.
* @throws AssertionError - if the actual VecSize's height is not equal to the given one.
*/
public S hasHeight(VecNumericalValue height) {
// check that actual VecSize we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting height of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecNumericalValue actualHeight = actual.getHeight();
if (!Objects.areEqual(actualHeight, height)) {
failWithMessage(assertjErrorMessage, actual, height, actualHeight);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSize's width is equal to the given one.
* @param width the given width to compare the actual VecSize's width to.
* @return this assertion object.
* @throws AssertionError - if the actual VecSize's width is not equal to the given one.
*/
public S hasWidth(VecNumericalValue width) {
// check that actual VecSize we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting width of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecNumericalValue actualWidth = actual.getWidth();
if (!Objects.areEqual(actualWidth, width)) {
failWithMessage(assertjErrorMessage, actual, width, actualWidth);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSize's xmlId is equal to the given one.
* @param xmlId the given xmlId to compare the actual VecSize's xmlId to.
* @return this assertion object.
* @throws AssertionError - if the actual VecSize's xmlId is not equal to the given one.
*/
public S hasXmlId(String xmlId) {
// check that actual VecSize we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting xmlId of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualXmlId = actual.getXmlId();
if (!Objects.areEqual(actualXmlId, xmlId)) {
failWithMessage(assertjErrorMessage, actual, xmlId, actualXmlId);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy