
com.foursoft.vecmodel.vec120.AbstractVecGeometrySegment3DAssert 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 VecGeometrySegment3D} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecGeometrySegment3DAssert, A extends VecGeometrySegment3D> extends AbstractVecGeometrySegmentAssert {
/**
* Creates a new {@link AbstractVecGeometrySegment3DAssert}
to make assertions on actual VecGeometrySegment3D.
* @param actual the VecGeometrySegment3D we want to make assertions on.
*/
protected AbstractVecGeometrySegment3DAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecGeometrySegment3D's curves contains the given VecCurve3D elements.
* @param curves the given elements that should be contained in actual VecGeometrySegment3D's curves.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment3D's curves does not contain all given VecCurve3D elements.
*/
public S hasCurves(VecCurve3D... curves) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// check that given VecCurve3D varargs is not null.
if (curves == null) failWithMessage("Expecting curves 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.getCurves(), curves);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's curves contains the given VecCurve3D elements in Collection.
* @param curves the given elements that should be contained in actual VecGeometrySegment3D's curves.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment3D's curves does not contain all given VecCurve3D elements.
*/
public S hasCurves(java.util.Collection extends VecCurve3D> curves) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// check that given VecCurve3D collection is not null.
if (curves == null) {
failWithMessage("Expecting curves 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.getCurves(), curves.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's curves contains only the given VecCurve3D elements and nothing else in whatever order.
* @param curves the given elements that should be contained in actual VecGeometrySegment3D's curves.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment3D's curves does not contain all given VecCurve3D elements.
*/
public S hasOnlyCurves(VecCurve3D... curves) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// check that given VecCurve3D varargs is not null.
if (curves == null) failWithMessage("Expecting curves 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.getCurves(), curves);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's curves contains only the given VecCurve3D elements in Collection and nothing else in whatever order.
* @param curves the given elements that should be contained in actual VecGeometrySegment3D's curves.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment3D's curves does not contain all given VecCurve3D elements.
*/
public S hasOnlyCurves(java.util.Collection extends VecCurve3D> curves) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// check that given VecCurve3D collection is not null.
if (curves == null) {
failWithMessage("Expecting curves 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.getCurves(), curves.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's curves does not contain the given VecCurve3D elements.
*
* @param curves the given elements that should not be in actual VecGeometrySegment3D's curves.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment3D's curves contains any given VecCurve3D elements.
*/
public S doesNotHaveCurves(VecCurve3D... curves) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// check that given VecCurve3D varargs is not null.
if (curves == null) failWithMessage("Expecting curves parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getCurves(), curves);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's curves does not contain the given VecCurve3D elements in Collection.
*
* @param curves the given elements that should not be in actual VecGeometrySegment3D's curves.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment3D's curves contains any given VecCurve3D elements.
*/
public S doesNotHaveCurves(java.util.Collection extends VecCurve3D> curves) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// check that given VecCurve3D collection is not null.
if (curves == null) {
failWithMessage("Expecting curves 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.getCurves(), curves.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D has no curves.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment3D's curves is not empty.
*/
public S hasNoCurves() {
// check that actual VecGeometrySegment3D 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 curves but had :\n <%s>";
// check
if (actual.getCurves().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getCurves());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's endNode is equal to the given one.
* @param endNode the given endNode to compare the actual VecGeometrySegment3D's endNode to.
* @return this assertion object.
* @throws AssertionError - if the actual VecGeometrySegment3D's endNode is not equal to the given one.
*/
public S hasEndNode(VecGeometryNode3D endNode) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting endNode of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecGeometryNode3D actualEndNode = actual.getEndNode();
if (!Objects.areEqual(actualEndNode, endNode)) {
failWithMessage(assertjErrorMessage, actual, endNode, actualEndNode);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's endVector is equal to the given one.
* @param endVector the given endVector to compare the actual VecGeometrySegment3D's endVector to.
* @return this assertion object.
* @throws AssertionError - if the actual VecGeometrySegment3D's endVector is not equal to the given one.
*/
public S hasEndVector(VecCartesianVector3D endVector) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting endVector of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecCartesianVector3D actualEndVector = actual.getEndVector();
if (!Objects.areEqual(actualEndVector, endVector)) {
failWithMessage(assertjErrorMessage, actual, endVector, actualEndVector);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's parentBuildingBlockSpecification3D is equal to the given one.
* @param parentBuildingBlockSpecification3D the given parentBuildingBlockSpecification3D to compare the actual VecGeometrySegment3D's parentBuildingBlockSpecification3D to.
* @return this assertion object.
* @throws AssertionError - if the actual VecGeometrySegment3D's parentBuildingBlockSpecification3D is not equal to the given one.
*/
public S hasParentBuildingBlockSpecification3D(VecBuildingBlockSpecification3D parentBuildingBlockSpecification3D) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentBuildingBlockSpecification3D of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecBuildingBlockSpecification3D actualParentBuildingBlockSpecification3D = actual.getParentBuildingBlockSpecification3D();
if (!Objects.areEqual(actualParentBuildingBlockSpecification3D, parentBuildingBlockSpecification3D)) {
failWithMessage(assertjErrorMessage, actual, parentBuildingBlockSpecification3D, actualParentBuildingBlockSpecification3D);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's startNode is equal to the given one.
* @param startNode the given startNode to compare the actual VecGeometrySegment3D's startNode to.
* @return this assertion object.
* @throws AssertionError - if the actual VecGeometrySegment3D's startNode is not equal to the given one.
*/
public S hasStartNode(VecGeometryNode3D startNode) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting startNode of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecGeometryNode3D actualStartNode = actual.getStartNode();
if (!Objects.areEqual(actualStartNode, startNode)) {
failWithMessage(assertjErrorMessage, actual, startNode, actualStartNode);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment3D's startVector is equal to the given one.
* @param startVector the given startVector to compare the actual VecGeometrySegment3D's startVector to.
* @return this assertion object.
* @throws AssertionError - if the actual VecGeometrySegment3D's startVector is not equal to the given one.
*/
public S hasStartVector(VecCartesianVector3D startVector) {
// check that actual VecGeometrySegment3D we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting startVector of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecCartesianVector3D actualStartVector = actual.getStartVector();
if (!Objects.areEqual(actualStartVector, startVector)) {
failWithMessage(assertjErrorMessage, actual, startVector, actualStartVector);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy