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