
com.foursoft.vecmodel.vec120.AbstractVecPathAssert 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 VecPath} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecPathAssert, A extends VecPath> extends AbstractVecExtendableElementAssert {
/**
* Creates a new {@link AbstractVecPathAssert}
to make assertions on actual VecPath.
* @param actual the VecPath we want to make assertions on.
*/
protected AbstractVecPathAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecPath's parentDimension is equal to the given one.
* @param parentDimension the given parentDimension to compare the actual VecPath's parentDimension to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPath's parentDimension is not equal to the given one.
*/
public S hasParentDimension(VecDimension parentDimension) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentDimension of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecDimension actualParentDimension = actual.getParentDimension();
if (!Objects.areEqual(actualParentDimension, parentDimension)) {
failWithMessage(assertjErrorMessage, actual, parentDimension, actualParentDimension);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's parentOnWayPlacement is equal to the given one.
* @param parentOnWayPlacement the given parentOnWayPlacement to compare the actual VecPath's parentOnWayPlacement to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPath's parentOnWayPlacement is not equal to the given one.
*/
public S hasParentOnWayPlacement(VecOnWayPlacement parentOnWayPlacement) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentOnWayPlacement of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecOnWayPlacement actualParentOnWayPlacement = actual.getParentOnWayPlacement();
if (!Objects.areEqual(actualParentOnWayPlacement, parentOnWayPlacement)) {
failWithMessage(assertjErrorMessage, actual, parentOnWayPlacement, actualParentOnWayPlacement);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's parentRouting is equal to the given one.
* @param parentRouting the given parentRouting to compare the actual VecPath's parentRouting to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPath's parentRouting is not equal to the given one.
*/
public S hasParentRouting(VecRouting parentRouting) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentRouting of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecRouting actualParentRouting = actual.getParentRouting();
if (!Objects.areEqual(actualParentRouting, parentRouting)) {
failWithMessage(assertjErrorMessage, actual, parentRouting, actualParentRouting);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's parentSegmentMapping is equal to the given one.
* @param parentSegmentMapping the given parentSegmentMapping to compare the actual VecPath's parentSegmentMapping to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPath's parentSegmentMapping is not equal to the given one.
*/
public S hasParentSegmentMapping(VecSegmentMapping parentSegmentMapping) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentSegmentMapping of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecSegmentMapping actualParentSegmentMapping = actual.getParentSegmentMapping();
if (!Objects.areEqual(actualParentSegmentMapping, parentSegmentMapping)) {
failWithMessage(assertjErrorMessage, actual, parentSegmentMapping, actualParentSegmentMapping);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's parentTopologyBendingRestriction is equal to the given one.
* @param parentTopologyBendingRestriction the given parentTopologyBendingRestriction to compare the actual VecPath's parentTopologyBendingRestriction to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPath's parentTopologyBendingRestriction is not equal to the given one.
*/
public S hasParentTopologyBendingRestriction(VecTopologyBendingRestriction parentTopologyBendingRestriction) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentTopologyBendingRestriction of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecTopologyBendingRestriction actualParentTopologyBendingRestriction = actual.getParentTopologyBendingRestriction();
if (!Objects.areEqual(actualParentTopologyBendingRestriction, parentTopologyBendingRestriction)) {
failWithMessage(assertjErrorMessage, actual, parentTopologyBendingRestriction, actualParentTopologyBendingRestriction);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's segment contains the given VecTopologySegment elements.
* @param segment the given elements that should be contained in actual VecPath's segment.
* @return this assertion object.
* @throws AssertionError if the actual VecPath's segment does not contain all given VecTopologySegment elements.
*/
public S hasSegment(VecTopologySegment... segment) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// check that given VecTopologySegment varargs is not null.
if (segment == null) failWithMessage("Expecting segment 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.getSegment(), segment);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's segment contains the given VecTopologySegment elements in Collection.
* @param segment the given elements that should be contained in actual VecPath's segment.
* @return this assertion object.
* @throws AssertionError if the actual VecPath's segment does not contain all given VecTopologySegment elements.
*/
public S hasSegment(java.util.Collection extends VecTopologySegment> segment) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// check that given VecTopologySegment collection is not null.
if (segment == null) {
failWithMessage("Expecting segment 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.getSegment(), segment.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's segment contains only the given VecTopologySegment elements and nothing else in whatever order.
* @param segment the given elements that should be contained in actual VecPath's segment.
* @return this assertion object.
* @throws AssertionError if the actual VecPath's segment does not contain all given VecTopologySegment elements.
*/
public S hasOnlySegment(VecTopologySegment... segment) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// check that given VecTopologySegment varargs is not null.
if (segment == null) failWithMessage("Expecting segment 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.getSegment(), segment);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's segment contains only the given VecTopologySegment elements in Collection and nothing else in whatever order.
* @param segment the given elements that should be contained in actual VecPath's segment.
* @return this assertion object.
* @throws AssertionError if the actual VecPath's segment does not contain all given VecTopologySegment elements.
*/
public S hasOnlySegment(java.util.Collection extends VecTopologySegment> segment) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// check that given VecTopologySegment collection is not null.
if (segment == null) {
failWithMessage("Expecting segment 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.getSegment(), segment.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's segment does not contain the given VecTopologySegment elements.
*
* @param segment the given elements that should not be in actual VecPath's segment.
* @return this assertion object.
* @throws AssertionError if the actual VecPath's segment contains any given VecTopologySegment elements.
*/
public S doesNotHaveSegment(VecTopologySegment... segment) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// check that given VecTopologySegment varargs is not null.
if (segment == null) failWithMessage("Expecting segment parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getSegment(), segment);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath's segment does not contain the given VecTopologySegment elements in Collection.
*
* @param segment the given elements that should not be in actual VecPath's segment.
* @return this assertion object.
* @throws AssertionError if the actual VecPath's segment contains any given VecTopologySegment elements.
*/
public S doesNotHaveSegment(java.util.Collection extends VecTopologySegment> segment) {
// check that actual VecPath we want to make assertions on is not null.
isNotNull();
// check that given VecTopologySegment collection is not null.
if (segment == null) {
failWithMessage("Expecting segment 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.getSegment(), segment.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPath has no segment.
* @return this assertion object.
* @throws AssertionError if the actual VecPath's segment is not empty.
*/
public S hasNoSegment() {
// check that actual VecPath 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 segment but had :\n <%s>";
// check
if (actual.getSegment().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getSegment());
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy