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