
com.foursoft.vecmodel.vec120.AbstractVecPlacementPointReferenceAssert 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 VecPlacementPointReference} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecPlacementPointReferenceAssert, A extends VecPlacementPointReference> extends AbstractVecExtendableElementAssert {
/**
* Creates a new {@link AbstractVecPlacementPointReferenceAssert}
to make assertions on actual VecPlacementPointReference.
* @param actual the VecPlacementPointReference we want to make assertions on.
*/
protected AbstractVecPlacementPointReferenceAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecPlacementPointReference's identification is equal to the given one.
* @param identification the given identification to compare the actual VecPlacementPointReference's identification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPlacementPointReference's identification is not equal to the given one.
*/
public S hasIdentification(String identification) {
// check that actual VecPlacementPointReference we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting identification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualIdentification = actual.getIdentification();
if (!Objects.areEqual(actualIdentification, identification)) {
failWithMessage(assertjErrorMessage, actual, identification, actualIdentification);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPlacementPointReference's parentPlaceableElementRole is equal to the given one.
* @param parentPlaceableElementRole the given parentPlaceableElementRole to compare the actual VecPlacementPointReference's parentPlaceableElementRole to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPlacementPointReference's parentPlaceableElementRole is not equal to the given one.
*/
public S hasParentPlaceableElementRole(VecPlaceableElementRole parentPlaceableElementRole) {
// check that actual VecPlacementPointReference we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentPlaceableElementRole of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecPlaceableElementRole actualParentPlaceableElementRole = actual.getParentPlaceableElementRole();
if (!Objects.areEqual(actualParentPlaceableElementRole, parentPlaceableElementRole)) {
failWithMessage(assertjErrorMessage, actual, parentPlaceableElementRole, actualParentPlaceableElementRole);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPlacementPointReference's placementPoint is equal to the given one.
* @param placementPoint the given placementPoint to compare the actual VecPlacementPointReference's placementPoint to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPlacementPointReference's placementPoint is not equal to the given one.
*/
public S hasPlacementPoint(VecPlacementPoint placementPoint) {
// check that actual VecPlacementPointReference we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting placementPoint of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecPlacementPoint actualPlacementPoint = actual.getPlacementPoint();
if (!Objects.areEqual(actualPlacementPoint, placementPoint)) {
failWithMessage(assertjErrorMessage, actual, placementPoint, actualPlacementPoint);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPlacementPointReference's refLocation contains the given VecLocation elements.
* @param refLocation the given elements that should be contained in actual VecPlacementPointReference's refLocation.
* @return this assertion object.
* @throws AssertionError if the actual VecPlacementPointReference's refLocation does not contain all given VecLocation elements.
*/
public S hasRefLocation(VecLocation... refLocation) {
// check that actual VecPlacementPointReference we want to make assertions on is not null.
isNotNull();
// check that given VecLocation varargs is not null.
if (refLocation == null) failWithMessage("Expecting refLocation 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.getRefLocation(), refLocation);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPlacementPointReference's refLocation contains the given VecLocation elements in Collection.
* @param refLocation the given elements that should be contained in actual VecPlacementPointReference's refLocation.
* @return this assertion object.
* @throws AssertionError if the actual VecPlacementPointReference's refLocation does not contain all given VecLocation elements.
*/
public S hasRefLocation(java.util.Collection extends VecLocation> refLocation) {
// check that actual VecPlacementPointReference we want to make assertions on is not null.
isNotNull();
// check that given VecLocation collection is not null.
if (refLocation == null) {
failWithMessage("Expecting refLocation 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.getRefLocation(), refLocation.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPlacementPointReference's refLocation contains only the given VecLocation elements and nothing else in whatever order.
* @param refLocation the given elements that should be contained in actual VecPlacementPointReference's refLocation.
* @return this assertion object.
* @throws AssertionError if the actual VecPlacementPointReference's refLocation does not contain all given VecLocation elements.
*/
public S hasOnlyRefLocation(VecLocation... refLocation) {
// check that actual VecPlacementPointReference we want to make assertions on is not null.
isNotNull();
// check that given VecLocation varargs is not null.
if (refLocation == null) failWithMessage("Expecting refLocation 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.getRefLocation(), refLocation);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPlacementPointReference's refLocation contains only the given VecLocation elements in Collection and nothing else in whatever order.
* @param refLocation the given elements that should be contained in actual VecPlacementPointReference's refLocation.
* @return this assertion object.
* @throws AssertionError if the actual VecPlacementPointReference's refLocation does not contain all given VecLocation elements.
*/
public S hasOnlyRefLocation(java.util.Collection extends VecLocation> refLocation) {
// check that actual VecPlacementPointReference we want to make assertions on is not null.
isNotNull();
// check that given VecLocation collection is not null.
if (refLocation == null) {
failWithMessage("Expecting refLocation 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.getRefLocation(), refLocation.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPlacementPointReference's refLocation does not contain the given VecLocation elements.
*
* @param refLocation the given elements that should not be in actual VecPlacementPointReference's refLocation.
* @return this assertion object.
* @throws AssertionError if the actual VecPlacementPointReference's refLocation contains any given VecLocation elements.
*/
public S doesNotHaveRefLocation(VecLocation... refLocation) {
// check that actual VecPlacementPointReference we want to make assertions on is not null.
isNotNull();
// check that given VecLocation varargs is not null.
if (refLocation == null) failWithMessage("Expecting refLocation parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefLocation(), refLocation);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPlacementPointReference's refLocation does not contain the given VecLocation elements in Collection.
*
* @param refLocation the given elements that should not be in actual VecPlacementPointReference's refLocation.
* @return this assertion object.
* @throws AssertionError if the actual VecPlacementPointReference's refLocation contains any given VecLocation elements.
*/
public S doesNotHaveRefLocation(java.util.Collection extends VecLocation> refLocation) {
// check that actual VecPlacementPointReference we want to make assertions on is not null.
isNotNull();
// check that given VecLocation collection is not null.
if (refLocation == null) {
failWithMessage("Expecting refLocation 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.getRefLocation(), refLocation.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPlacementPointReference has no refLocation.
* @return this assertion object.
* @throws AssertionError if the actual VecPlacementPointReference's refLocation is not empty.
*/
public S hasNoRefLocation() {
// check that actual VecPlacementPointReference 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 refLocation but had :\n <%s>";
// check
if (actual.getRefLocation().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefLocation());
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy