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