
com.foursoft.vecmodel.vec120.AbstractVecFixingSpecificationAssert 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 VecFixingSpecification} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecFixingSpecificationAssert, A extends VecFixingSpecification> extends AbstractVecPartOrUsageRelatedSpecificationAssert {
/**
* Creates a new {@link AbstractVecFixingSpecificationAssert}
to make assertions on actual VecFixingSpecification.
* @param actual the VecFixingSpecification we want to make assertions on.
*/
protected AbstractVecFixingSpecificationAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecFixingSpecification's nominalSize is equal to the given one.
* @param nominalSize the given nominalSize to compare the actual VecFixingSpecification's nominalSize to.
* @return this assertion object.
* @throws AssertionError - if the actual VecFixingSpecification's nominalSize is not equal to the given one.
*/
public S hasNominalSize(VecNumericalValue nominalSize) {
// check that actual VecFixingSpecification we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting nominalSize of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecNumericalValue actualNominalSize = actual.getNominalSize();
if (!Objects.areEqual(actualNominalSize, nominalSize)) {
failWithMessage(assertjErrorMessage, actual, nominalSize, actualNominalSize);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFixingSpecification's offset is equal to the given one.
* @param offset the given offset to compare the actual VecFixingSpecification's offset to.
* @return this assertion object.
* @throws AssertionError - if the actual VecFixingSpecification's offset is not equal to the given one.
*/
public S hasOffset(VecNumericalValue offset) {
// check that actual VecFixingSpecification we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting offset of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecNumericalValue actualOffset = actual.getOffset();
if (!Objects.areEqual(actualOffset, offset)) {
failWithMessage(assertjErrorMessage, actual, offset, actualOffset);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFixingSpecification's refFixingRole contains the given VecFixingRole elements.
* @param refFixingRole the given elements that should be contained in actual VecFixingSpecification's refFixingRole.
* @return this assertion object.
* @throws AssertionError if the actual VecFixingSpecification's refFixingRole does not contain all given VecFixingRole elements.
*/
public S hasRefFixingRole(VecFixingRole... refFixingRole) {
// check that actual VecFixingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecFixingRole varargs is not null.
if (refFixingRole == null) failWithMessage("Expecting refFixingRole 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.getRefFixingRole(), refFixingRole);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFixingSpecification's refFixingRole contains the given VecFixingRole elements in Collection.
* @param refFixingRole the given elements that should be contained in actual VecFixingSpecification's refFixingRole.
* @return this assertion object.
* @throws AssertionError if the actual VecFixingSpecification's refFixingRole does not contain all given VecFixingRole elements.
*/
public S hasRefFixingRole(java.util.Collection extends VecFixingRole> refFixingRole) {
// check that actual VecFixingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecFixingRole collection is not null.
if (refFixingRole == null) {
failWithMessage("Expecting refFixingRole 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.getRefFixingRole(), refFixingRole.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFixingSpecification's refFixingRole contains only the given VecFixingRole elements and nothing else in whatever order.
* @param refFixingRole the given elements that should be contained in actual VecFixingSpecification's refFixingRole.
* @return this assertion object.
* @throws AssertionError if the actual VecFixingSpecification's refFixingRole does not contain all given VecFixingRole elements.
*/
public S hasOnlyRefFixingRole(VecFixingRole... refFixingRole) {
// check that actual VecFixingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecFixingRole varargs is not null.
if (refFixingRole == null) failWithMessage("Expecting refFixingRole 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.getRefFixingRole(), refFixingRole);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFixingSpecification's refFixingRole contains only the given VecFixingRole elements in Collection and nothing else in whatever order.
* @param refFixingRole the given elements that should be contained in actual VecFixingSpecification's refFixingRole.
* @return this assertion object.
* @throws AssertionError if the actual VecFixingSpecification's refFixingRole does not contain all given VecFixingRole elements.
*/
public S hasOnlyRefFixingRole(java.util.Collection extends VecFixingRole> refFixingRole) {
// check that actual VecFixingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecFixingRole collection is not null.
if (refFixingRole == null) {
failWithMessage("Expecting refFixingRole 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.getRefFixingRole(), refFixingRole.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFixingSpecification's refFixingRole does not contain the given VecFixingRole elements.
*
* @param refFixingRole the given elements that should not be in actual VecFixingSpecification's refFixingRole.
* @return this assertion object.
* @throws AssertionError if the actual VecFixingSpecification's refFixingRole contains any given VecFixingRole elements.
*/
public S doesNotHaveRefFixingRole(VecFixingRole... refFixingRole) {
// check that actual VecFixingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecFixingRole varargs is not null.
if (refFixingRole == null) failWithMessage("Expecting refFixingRole parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefFixingRole(), refFixingRole);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFixingSpecification's refFixingRole does not contain the given VecFixingRole elements in Collection.
*
* @param refFixingRole the given elements that should not be in actual VecFixingSpecification's refFixingRole.
* @return this assertion object.
* @throws AssertionError if the actual VecFixingSpecification's refFixingRole contains any given VecFixingRole elements.
*/
public S doesNotHaveRefFixingRole(java.util.Collection extends VecFixingRole> refFixingRole) {
// check that actual VecFixingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecFixingRole collection is not null.
if (refFixingRole == null) {
failWithMessage("Expecting refFixingRole 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.getRefFixingRole(), refFixingRole.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFixingSpecification has no refFixingRole.
* @return this assertion object.
* @throws AssertionError if the actual VecFixingSpecification's refFixingRole is not empty.
*/
public S hasNoRefFixingRole() {
// check that actual VecFixingSpecification 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 refFixingRole but had :\n <%s>";
// check
if (actual.getRefFixingRole().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefFixingRole());
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy