
com.foursoft.vecmodel.vec120.AbstractVecFillerSpecificationAssert 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 VecFillerSpecification} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecFillerSpecificationAssert, A extends VecFillerSpecification> extends AbstractVecSpecificationAssert {
/**
* Creates a new {@link AbstractVecFillerSpecificationAssert}
to make assertions on actual VecFillerSpecification.
* @param actual the VecFillerSpecification we want to make assertions on.
*/
protected AbstractVecFillerSpecificationAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecFillerSpecification's diameter is equal to the given one.
* @param diameter the given diameter to compare the actual VecFillerSpecification's diameter to.
* @return this assertion object.
* @throws AssertionError - if the actual VecFillerSpecification's diameter is not equal to the given one.
*/
public S hasDiameter(VecNumericalValue diameter) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting diameter of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecNumericalValue actualDiameter = actual.getDiameter();
if (!Objects.areEqual(actualDiameter, diameter)) {
failWithMessage(assertjErrorMessage, actual, diameter, actualDiameter);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's materials contains the given VecMaterial elements.
* @param materials the given elements that should be contained in actual VecFillerSpecification's materials.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's materials does not contain all given VecMaterial elements.
*/
public S hasMaterials(VecMaterial... materials) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecMaterial varargs is not null.
if (materials == null) failWithMessage("Expecting materials 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.getMaterials(), materials);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's materials contains the given VecMaterial elements in Collection.
* @param materials the given elements that should be contained in actual VecFillerSpecification's materials.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's materials does not contain all given VecMaterial elements.
*/
public S hasMaterials(java.util.Collection extends VecMaterial> materials) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecMaterial collection is not null.
if (materials == null) {
failWithMessage("Expecting materials 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.getMaterials(), materials.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's materials contains only the given VecMaterial elements and nothing else in whatever order.
* @param materials the given elements that should be contained in actual VecFillerSpecification's materials.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's materials does not contain all given VecMaterial elements.
*/
public S hasOnlyMaterials(VecMaterial... materials) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecMaterial varargs is not null.
if (materials == null) failWithMessage("Expecting materials 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.getMaterials(), materials);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's materials contains only the given VecMaterial elements in Collection and nothing else in whatever order.
* @param materials the given elements that should be contained in actual VecFillerSpecification's materials.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's materials does not contain all given VecMaterial elements.
*/
public S hasOnlyMaterials(java.util.Collection extends VecMaterial> materials) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecMaterial collection is not null.
if (materials == null) {
failWithMessage("Expecting materials 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.getMaterials(), materials.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's materials does not contain the given VecMaterial elements.
*
* @param materials the given elements that should not be in actual VecFillerSpecification's materials.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's materials contains any given VecMaterial elements.
*/
public S doesNotHaveMaterials(VecMaterial... materials) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecMaterial varargs is not null.
if (materials == null) failWithMessage("Expecting materials parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getMaterials(), materials);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's materials does not contain the given VecMaterial elements in Collection.
*
* @param materials the given elements that should not be in actual VecFillerSpecification's materials.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's materials contains any given VecMaterial elements.
*/
public S doesNotHaveMaterials(java.util.Collection extends VecMaterial> materials) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecMaterial collection is not null.
if (materials == null) {
failWithMessage("Expecting materials 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.getMaterials(), materials.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification has no materials.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's materials is not empty.
*/
public S hasNoMaterials() {
// check that actual VecFillerSpecification 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 materials but had :\n <%s>";
// check
if (actual.getMaterials().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getMaterials());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's refWireElementSpecification contains the given VecWireElementSpecification elements.
* @param refWireElementSpecification the given elements that should be contained in actual VecFillerSpecification's refWireElementSpecification.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's refWireElementSpecification does not contain all given VecWireElementSpecification elements.
*/
public S hasRefWireElementSpecification(VecWireElementSpecification... refWireElementSpecification) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementSpecification varargs is not null.
if (refWireElementSpecification == null) failWithMessage("Expecting refWireElementSpecification 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.getRefWireElementSpecification(), refWireElementSpecification);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's refWireElementSpecification contains the given VecWireElementSpecification elements in Collection.
* @param refWireElementSpecification the given elements that should be contained in actual VecFillerSpecification's refWireElementSpecification.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's refWireElementSpecification does not contain all given VecWireElementSpecification elements.
*/
public S hasRefWireElementSpecification(java.util.Collection extends VecWireElementSpecification> refWireElementSpecification) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementSpecification collection is not null.
if (refWireElementSpecification == null) {
failWithMessage("Expecting refWireElementSpecification 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.getRefWireElementSpecification(), refWireElementSpecification.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's refWireElementSpecification contains only the given VecWireElementSpecification elements and nothing else in whatever order.
* @param refWireElementSpecification the given elements that should be contained in actual VecFillerSpecification's refWireElementSpecification.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's refWireElementSpecification does not contain all given VecWireElementSpecification elements.
*/
public S hasOnlyRefWireElementSpecification(VecWireElementSpecification... refWireElementSpecification) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementSpecification varargs is not null.
if (refWireElementSpecification == null) failWithMessage("Expecting refWireElementSpecification 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.getRefWireElementSpecification(), refWireElementSpecification);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's refWireElementSpecification contains only the given VecWireElementSpecification elements in Collection and nothing else in whatever order.
* @param refWireElementSpecification the given elements that should be contained in actual VecFillerSpecification's refWireElementSpecification.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's refWireElementSpecification does not contain all given VecWireElementSpecification elements.
*/
public S hasOnlyRefWireElementSpecification(java.util.Collection extends VecWireElementSpecification> refWireElementSpecification) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementSpecification collection is not null.
if (refWireElementSpecification == null) {
failWithMessage("Expecting refWireElementSpecification 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.getRefWireElementSpecification(), refWireElementSpecification.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's refWireElementSpecification does not contain the given VecWireElementSpecification elements.
*
* @param refWireElementSpecification the given elements that should not be in actual VecFillerSpecification's refWireElementSpecification.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's refWireElementSpecification contains any given VecWireElementSpecification elements.
*/
public S doesNotHaveRefWireElementSpecification(VecWireElementSpecification... refWireElementSpecification) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementSpecification varargs is not null.
if (refWireElementSpecification == null) failWithMessage("Expecting refWireElementSpecification parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefWireElementSpecification(), refWireElementSpecification);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification's refWireElementSpecification does not contain the given VecWireElementSpecification elements in Collection.
*
* @param refWireElementSpecification the given elements that should not be in actual VecFillerSpecification's refWireElementSpecification.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's refWireElementSpecification contains any given VecWireElementSpecification elements.
*/
public S doesNotHaveRefWireElementSpecification(java.util.Collection extends VecWireElementSpecification> refWireElementSpecification) {
// check that actual VecFillerSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecWireElementSpecification collection is not null.
if (refWireElementSpecification == null) {
failWithMessage("Expecting refWireElementSpecification 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.getRefWireElementSpecification(), refWireElementSpecification.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecFillerSpecification has no refWireElementSpecification.
* @return this assertion object.
* @throws AssertionError if the actual VecFillerSpecification's refWireElementSpecification is not empty.
*/
public S hasNoRefWireElementSpecification() {
// check that actual VecFillerSpecification 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 refWireElementSpecification but had :\n <%s>";
// check
if (actual.getRefWireElementSpecification().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefWireElementSpecification());
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy