
com.foursoft.vecmodel.vec120.AbstractVecGeometryNode2DAssert 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 VecGeometryNode2D} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecGeometryNode2DAssert, A extends VecGeometryNode2D> extends AbstractVecGeometryNodeAssert {
/**
* Creates a new {@link AbstractVecGeometryNode2DAssert}
to make assertions on actual VecGeometryNode2D.
* @param actual the VecGeometryNode2D we want to make assertions on.
*/
protected AbstractVecGeometryNode2DAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecGeometryNode2D's cartesianPoint is equal to the given one.
* @param cartesianPoint the given cartesianPoint to compare the actual VecGeometryNode2D's cartesianPoint to.
* @return this assertion object.
* @throws AssertionError - if the actual VecGeometryNode2D's cartesianPoint is not equal to the given one.
*/
public S hasCartesianPoint(VecCartesianPoint2D cartesianPoint) {
// check that actual VecGeometryNode2D we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting cartesianPoint of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecCartesianPoint2D actualCartesianPoint = actual.getCartesianPoint();
if (!Objects.areEqual(actualCartesianPoint, cartesianPoint)) {
failWithMessage(assertjErrorMessage, actual, cartesianPoint, actualCartesianPoint);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometryNode2D's parentBuildingBlockSpecification2D is equal to the given one.
* @param parentBuildingBlockSpecification2D the given parentBuildingBlockSpecification2D to compare the actual VecGeometryNode2D's parentBuildingBlockSpecification2D to.
* @return this assertion object.
* @throws AssertionError - if the actual VecGeometryNode2D's parentBuildingBlockSpecification2D is not equal to the given one.
*/
public S hasParentBuildingBlockSpecification2D(VecBuildingBlockSpecification2D parentBuildingBlockSpecification2D) {
// check that actual VecGeometryNode2D we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentBuildingBlockSpecification2D of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecBuildingBlockSpecification2D actualParentBuildingBlockSpecification2D = actual.getParentBuildingBlockSpecification2D();
if (!Objects.areEqual(actualParentBuildingBlockSpecification2D, parentBuildingBlockSpecification2D)) {
failWithMessage(assertjErrorMessage, actual, parentBuildingBlockSpecification2D, actualParentBuildingBlockSpecification2D);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometryNode2D's refGeometrySegment2D contains the given VecGeometrySegment2D elements.
* @param refGeometrySegment2D the given elements that should be contained in actual VecGeometryNode2D's refGeometrySegment2D.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometryNode2D's refGeometrySegment2D does not contain all given VecGeometrySegment2D elements.
*/
public S hasRefGeometrySegment2D(VecGeometrySegment2D... refGeometrySegment2D) {
// check that actual VecGeometryNode2D we want to make assertions on is not null.
isNotNull();
// check that given VecGeometrySegment2D varargs is not null.
if (refGeometrySegment2D == null) failWithMessage("Expecting refGeometrySegment2D 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.getRefGeometrySegment2D(), refGeometrySegment2D);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometryNode2D's refGeometrySegment2D contains the given VecGeometrySegment2D elements in Collection.
* @param refGeometrySegment2D the given elements that should be contained in actual VecGeometryNode2D's refGeometrySegment2D.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometryNode2D's refGeometrySegment2D does not contain all given VecGeometrySegment2D elements.
*/
public S hasRefGeometrySegment2D(java.util.Collection extends VecGeometrySegment2D> refGeometrySegment2D) {
// check that actual VecGeometryNode2D we want to make assertions on is not null.
isNotNull();
// check that given VecGeometrySegment2D collection is not null.
if (refGeometrySegment2D == null) {
failWithMessage("Expecting refGeometrySegment2D 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.getRefGeometrySegment2D(), refGeometrySegment2D.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometryNode2D's refGeometrySegment2D contains only the given VecGeometrySegment2D elements and nothing else in whatever order.
* @param refGeometrySegment2D the given elements that should be contained in actual VecGeometryNode2D's refGeometrySegment2D.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometryNode2D's refGeometrySegment2D does not contain all given VecGeometrySegment2D elements.
*/
public S hasOnlyRefGeometrySegment2D(VecGeometrySegment2D... refGeometrySegment2D) {
// check that actual VecGeometryNode2D we want to make assertions on is not null.
isNotNull();
// check that given VecGeometrySegment2D varargs is not null.
if (refGeometrySegment2D == null) failWithMessage("Expecting refGeometrySegment2D 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.getRefGeometrySegment2D(), refGeometrySegment2D);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometryNode2D's refGeometrySegment2D contains only the given VecGeometrySegment2D elements in Collection and nothing else in whatever order.
* @param refGeometrySegment2D the given elements that should be contained in actual VecGeometryNode2D's refGeometrySegment2D.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometryNode2D's refGeometrySegment2D does not contain all given VecGeometrySegment2D elements.
*/
public S hasOnlyRefGeometrySegment2D(java.util.Collection extends VecGeometrySegment2D> refGeometrySegment2D) {
// check that actual VecGeometryNode2D we want to make assertions on is not null.
isNotNull();
// check that given VecGeometrySegment2D collection is not null.
if (refGeometrySegment2D == null) {
failWithMessage("Expecting refGeometrySegment2D 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.getRefGeometrySegment2D(), refGeometrySegment2D.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometryNode2D's refGeometrySegment2D does not contain the given VecGeometrySegment2D elements.
*
* @param refGeometrySegment2D the given elements that should not be in actual VecGeometryNode2D's refGeometrySegment2D.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometryNode2D's refGeometrySegment2D contains any given VecGeometrySegment2D elements.
*/
public S doesNotHaveRefGeometrySegment2D(VecGeometrySegment2D... refGeometrySegment2D) {
// check that actual VecGeometryNode2D we want to make assertions on is not null.
isNotNull();
// check that given VecGeometrySegment2D varargs is not null.
if (refGeometrySegment2D == null) failWithMessage("Expecting refGeometrySegment2D parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefGeometrySegment2D(), refGeometrySegment2D);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometryNode2D's refGeometrySegment2D does not contain the given VecGeometrySegment2D elements in Collection.
*
* @param refGeometrySegment2D the given elements that should not be in actual VecGeometryNode2D's refGeometrySegment2D.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometryNode2D's refGeometrySegment2D contains any given VecGeometrySegment2D elements.
*/
public S doesNotHaveRefGeometrySegment2D(java.util.Collection extends VecGeometrySegment2D> refGeometrySegment2D) {
// check that actual VecGeometryNode2D we want to make assertions on is not null.
isNotNull();
// check that given VecGeometrySegment2D collection is not null.
if (refGeometrySegment2D == null) {
failWithMessage("Expecting refGeometrySegment2D 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.getRefGeometrySegment2D(), refGeometrySegment2D.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometryNode2D has no refGeometrySegment2D.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometryNode2D's refGeometrySegment2D is not empty.
*/
public S hasNoRefGeometrySegment2D() {
// check that actual VecGeometryNode2D 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 refGeometrySegment2D but had :\n <%s>";
// check
if (actual.getRefGeometrySegment2D().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefGeometrySegment2D());
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy