
com.foursoft.vecmodel.vec120.AbstractVecRoutingSpecificationAssert 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;
/**
* Abstract base class for {@link VecRoutingSpecification} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecRoutingSpecificationAssert, A extends VecRoutingSpecification> extends AbstractVecSpecificationAssert {
/**
* Creates a new {@link AbstractVecRoutingSpecificationAssert}
to make assertions on actual VecRoutingSpecification.
* @param actual the VecRoutingSpecification we want to make assertions on.
*/
protected AbstractVecRoutingSpecificationAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecRoutingSpecification's routings contains the given VecRouting elements.
* @param routings the given elements that should be contained in actual VecRoutingSpecification's routings.
* @return this assertion object.
* @throws AssertionError if the actual VecRoutingSpecification's routings does not contain all given VecRouting elements.
*/
public S hasRoutings(VecRouting... routings) {
// check that actual VecRoutingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecRouting varargs is not null.
if (routings == null) failWithMessage("Expecting routings 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.getRoutings(), routings);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecRoutingSpecification's routings contains the given VecRouting elements in Collection.
* @param routings the given elements that should be contained in actual VecRoutingSpecification's routings.
* @return this assertion object.
* @throws AssertionError if the actual VecRoutingSpecification's routings does not contain all given VecRouting elements.
*/
public S hasRoutings(java.util.Collection extends VecRouting> routings) {
// check that actual VecRoutingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecRouting collection is not null.
if (routings == null) {
failWithMessage("Expecting routings 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.getRoutings(), routings.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecRoutingSpecification's routings contains only the given VecRouting elements and nothing else in whatever order.
* @param routings the given elements that should be contained in actual VecRoutingSpecification's routings.
* @return this assertion object.
* @throws AssertionError if the actual VecRoutingSpecification's routings does not contain all given VecRouting elements.
*/
public S hasOnlyRoutings(VecRouting... routings) {
// check that actual VecRoutingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecRouting varargs is not null.
if (routings == null) failWithMessage("Expecting routings 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.getRoutings(), routings);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecRoutingSpecification's routings contains only the given VecRouting elements in Collection and nothing else in whatever order.
* @param routings the given elements that should be contained in actual VecRoutingSpecification's routings.
* @return this assertion object.
* @throws AssertionError if the actual VecRoutingSpecification's routings does not contain all given VecRouting elements.
*/
public S hasOnlyRoutings(java.util.Collection extends VecRouting> routings) {
// check that actual VecRoutingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecRouting collection is not null.
if (routings == null) {
failWithMessage("Expecting routings 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.getRoutings(), routings.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecRoutingSpecification's routings does not contain the given VecRouting elements.
*
* @param routings the given elements that should not be in actual VecRoutingSpecification's routings.
* @return this assertion object.
* @throws AssertionError if the actual VecRoutingSpecification's routings contains any given VecRouting elements.
*/
public S doesNotHaveRoutings(VecRouting... routings) {
// check that actual VecRoutingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecRouting varargs is not null.
if (routings == null) failWithMessage("Expecting routings parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRoutings(), routings);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecRoutingSpecification's routings does not contain the given VecRouting elements in Collection.
*
* @param routings the given elements that should not be in actual VecRoutingSpecification's routings.
* @return this assertion object.
* @throws AssertionError if the actual VecRoutingSpecification's routings contains any given VecRouting elements.
*/
public S doesNotHaveRoutings(java.util.Collection extends VecRouting> routings) {
// check that actual VecRoutingSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecRouting collection is not null.
if (routings == null) {
failWithMessage("Expecting routings 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.getRoutings(), routings.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecRoutingSpecification has no routings.
* @return this assertion object.
* @throws AssertionError if the actual VecRoutingSpecification's routings is not empty.
*/
public S hasNoRoutings() {
// check that actual VecRoutingSpecification 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 routings but had :\n <%s>";
// check
if (actual.getRoutings().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRoutings());
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy