
com.foursoft.vecmodel.vec120.AbstractVecMatingPointAssert 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 VecMatingPoint} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecMatingPointAssert, A extends VecMatingPoint> extends AbstractVecConfigurableElementAssert {
/**
* Creates a new {@link AbstractVecMatingPointAssert}
to make assertions on actual VecMatingPoint.
* @param actual the VecMatingPoint we want to make assertions on.
*/
protected AbstractVecMatingPointAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecMatingPoint's connection is equal to the given one.
* @param connection the given connection to compare the actual VecMatingPoint's connection to.
* @return this assertion object.
* @throws AssertionError - if the actual VecMatingPoint's connection is not equal to the given one.
*/
public S hasConnection(VecConnection connection) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting connection of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecConnection actualConnection = actual.getConnection();
if (!Objects.areEqual(actualConnection, connection)) {
failWithMessage(assertjErrorMessage, actual, connection, actualConnection);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint's firstTerminalRole is equal to the given one.
* @param firstTerminalRole the given firstTerminalRole to compare the actual VecMatingPoint's firstTerminalRole to.
* @return this assertion object.
* @throws AssertionError - if the actual VecMatingPoint's firstTerminalRole is not equal to the given one.
*/
public S hasFirstTerminalRole(VecTerminalRole firstTerminalRole) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting firstTerminalRole of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecTerminalRole actualFirstTerminalRole = actual.getFirstTerminalRole();
if (!Objects.areEqual(actualFirstTerminalRole, firstTerminalRole)) {
failWithMessage(assertjErrorMessage, actual, firstTerminalRole, actualFirstTerminalRole);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint's identification is equal to the given one.
* @param identification the given identification to compare the actual VecMatingPoint's identification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecMatingPoint's identification is not equal to the given one.
*/
public S hasIdentification(String identification) {
// check that actual VecMatingPoint 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 VecMatingPoint's matingDetails contains the given VecMatingDetail elements.
* @param matingDetails the given elements that should be contained in actual VecMatingPoint's matingDetails.
* @return this assertion object.
* @throws AssertionError if the actual VecMatingPoint's matingDetails does not contain all given VecMatingDetail elements.
*/
public S hasMatingDetails(VecMatingDetail... matingDetails) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// check that given VecMatingDetail varargs is not null.
if (matingDetails == null) failWithMessage("Expecting matingDetails 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.getMatingDetails(), matingDetails);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint's matingDetails contains the given VecMatingDetail elements in Collection.
* @param matingDetails the given elements that should be contained in actual VecMatingPoint's matingDetails.
* @return this assertion object.
* @throws AssertionError if the actual VecMatingPoint's matingDetails does not contain all given VecMatingDetail elements.
*/
public S hasMatingDetails(java.util.Collection extends VecMatingDetail> matingDetails) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// check that given VecMatingDetail collection is not null.
if (matingDetails == null) {
failWithMessage("Expecting matingDetails 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.getMatingDetails(), matingDetails.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint's matingDetails contains only the given VecMatingDetail elements and nothing else in whatever order.
* @param matingDetails the given elements that should be contained in actual VecMatingPoint's matingDetails.
* @return this assertion object.
* @throws AssertionError if the actual VecMatingPoint's matingDetails does not contain all given VecMatingDetail elements.
*/
public S hasOnlyMatingDetails(VecMatingDetail... matingDetails) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// check that given VecMatingDetail varargs is not null.
if (matingDetails == null) failWithMessage("Expecting matingDetails 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.getMatingDetails(), matingDetails);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint's matingDetails contains only the given VecMatingDetail elements in Collection and nothing else in whatever order.
* @param matingDetails the given elements that should be contained in actual VecMatingPoint's matingDetails.
* @return this assertion object.
* @throws AssertionError if the actual VecMatingPoint's matingDetails does not contain all given VecMatingDetail elements.
*/
public S hasOnlyMatingDetails(java.util.Collection extends VecMatingDetail> matingDetails) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// check that given VecMatingDetail collection is not null.
if (matingDetails == null) {
failWithMessage("Expecting matingDetails 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.getMatingDetails(), matingDetails.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint's matingDetails does not contain the given VecMatingDetail elements.
*
* @param matingDetails the given elements that should not be in actual VecMatingPoint's matingDetails.
* @return this assertion object.
* @throws AssertionError if the actual VecMatingPoint's matingDetails contains any given VecMatingDetail elements.
*/
public S doesNotHaveMatingDetails(VecMatingDetail... matingDetails) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// check that given VecMatingDetail varargs is not null.
if (matingDetails == null) failWithMessage("Expecting matingDetails parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getMatingDetails(), matingDetails);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint's matingDetails does not contain the given VecMatingDetail elements in Collection.
*
* @param matingDetails the given elements that should not be in actual VecMatingPoint's matingDetails.
* @return this assertion object.
* @throws AssertionError if the actual VecMatingPoint's matingDetails contains any given VecMatingDetail elements.
*/
public S doesNotHaveMatingDetails(java.util.Collection extends VecMatingDetail> matingDetails) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// check that given VecMatingDetail collection is not null.
if (matingDetails == null) {
failWithMessage("Expecting matingDetails 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.getMatingDetails(), matingDetails.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint has no matingDetails.
* @return this assertion object.
* @throws AssertionError if the actual VecMatingPoint's matingDetails is not empty.
*/
public S hasNoMatingDetails() {
// check that actual VecMatingPoint 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 matingDetails but had :\n <%s>";
// check
if (actual.getMatingDetails().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getMatingDetails());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint's parentCouplingPoint is equal to the given one.
* @param parentCouplingPoint the given parentCouplingPoint to compare the actual VecMatingPoint's parentCouplingPoint to.
* @return this assertion object.
* @throws AssertionError - if the actual VecMatingPoint's parentCouplingPoint is not equal to the given one.
*/
public S hasParentCouplingPoint(VecCouplingPoint parentCouplingPoint) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentCouplingPoint of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecCouplingPoint actualParentCouplingPoint = actual.getParentCouplingPoint();
if (!Objects.areEqual(actualParentCouplingPoint, parentCouplingPoint)) {
failWithMessage(assertjErrorMessage, actual, parentCouplingPoint, actualParentCouplingPoint);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecMatingPoint's secondTerminalRole is equal to the given one.
* @param secondTerminalRole the given secondTerminalRole to compare the actual VecMatingPoint's secondTerminalRole to.
* @return this assertion object.
* @throws AssertionError - if the actual VecMatingPoint's secondTerminalRole is not equal to the given one.
*/
public S hasSecondTerminalRole(VecTerminalRole secondTerminalRole) {
// check that actual VecMatingPoint we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting secondTerminalRole of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecTerminalRole actualSecondTerminalRole = actual.getSecondTerminalRole();
if (!Objects.areEqual(actualSecondTerminalRole, secondTerminalRole)) {
failWithMessage(assertjErrorMessage, actual, secondTerminalRole, actualSecondTerminalRole);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy