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