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