
com.foursoft.vecmodel.vec120.AbstractVecSpecificationAssert 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 VecSpecification} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecSpecificationAssert, A extends VecSpecification> extends AbstractVecExtendableElementAssert {
/**
* Creates a new {@link AbstractVecSpecificationAssert}
to make assertions on actual VecSpecification.
* @param actual the VecSpecification we want to make assertions on.
*/
protected AbstractVecSpecificationAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecSpecification's descriptions contains the given VecAbstractLocalizedString elements.
* @param descriptions the given elements that should be contained in actual VecSpecification's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecSpecification's descriptions does not contain all given VecAbstractLocalizedString elements.
*/
public S hasDescriptions(VecAbstractLocalizedString... descriptions) {
// check that actual VecSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString varargs is not null.
if (descriptions == null) failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSpecification's descriptions contains the given VecAbstractLocalizedString elements in Collection.
* @param descriptions the given elements that should be contained in actual VecSpecification's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecSpecification's descriptions does not contain all given VecAbstractLocalizedString elements.
*/
public S hasDescriptions(java.util.Collection extends VecAbstractLocalizedString> descriptions) {
// check that actual VecSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString collection is not null.
if (descriptions == null) {
failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSpecification's descriptions contains only the given VecAbstractLocalizedString elements and nothing else in whatever order.
* @param descriptions the given elements that should be contained in actual VecSpecification's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecSpecification's descriptions does not contain all given VecAbstractLocalizedString elements.
*/
public S hasOnlyDescriptions(VecAbstractLocalizedString... descriptions) {
// check that actual VecSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString varargs is not null.
if (descriptions == null) failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSpecification's descriptions contains only the given VecAbstractLocalizedString elements in Collection and nothing else in whatever order.
* @param descriptions the given elements that should be contained in actual VecSpecification's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecSpecification's descriptions does not contain all given VecAbstractLocalizedString elements.
*/
public S hasOnlyDescriptions(java.util.Collection extends VecAbstractLocalizedString> descriptions) {
// check that actual VecSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString collection is not null.
if (descriptions == null) {
failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSpecification's descriptions does not contain the given VecAbstractLocalizedString elements.
*
* @param descriptions the given elements that should not be in actual VecSpecification's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecSpecification's descriptions contains any given VecAbstractLocalizedString elements.
*/
public S doesNotHaveDescriptions(VecAbstractLocalizedString... descriptions) {
// check that actual VecSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString varargs is not null.
if (descriptions == null) failWithMessage("Expecting descriptions parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getDescriptions(), descriptions);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSpecification's descriptions does not contain the given VecAbstractLocalizedString elements in Collection.
*
* @param descriptions the given elements that should not be in actual VecSpecification's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecSpecification's descriptions contains any given VecAbstractLocalizedString elements.
*/
public S doesNotHaveDescriptions(java.util.Collection extends VecAbstractLocalizedString> descriptions) {
// check that actual VecSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString collection is not null.
if (descriptions == null) {
failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSpecification has no descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecSpecification's descriptions is not empty.
*/
public S hasNoDescriptions() {
// check that actual VecSpecification 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 descriptions but had :\n <%s>";
// check
if (actual.getDescriptions().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getDescriptions());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSpecification's identification is equal to the given one.
* @param identification the given identification to compare the actual VecSpecification's identification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecSpecification's identification is not equal to the given one.
*/
public S hasIdentification(String identification) {
// check that actual VecSpecification we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting identification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualIdentification = actual.getIdentification();
if (!Objects.areEqual(actualIdentification, identification)) {
failWithMessage(assertjErrorMessage, actual, identification, actualIdentification);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSpecification's parentDocumentVersion is equal to the given one.
* @param parentDocumentVersion the given parentDocumentVersion to compare the actual VecSpecification's parentDocumentVersion to.
* @return this assertion object.
* @throws AssertionError - if the actual VecSpecification's parentDocumentVersion is not equal to the given one.
*/
public S hasParentDocumentVersion(VecDocumentVersion parentDocumentVersion) {
// check that actual VecSpecification we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentDocumentVersion of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecDocumentVersion actualParentDocumentVersion = actual.getParentDocumentVersion();
if (!Objects.areEqual(actualParentDocumentVersion, parentDocumentVersion)) {
failWithMessage(assertjErrorMessage, actual, parentDocumentVersion, actualParentDocumentVersion);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecSpecification's parentSheetOrChapter is equal to the given one.
* @param parentSheetOrChapter the given parentSheetOrChapter to compare the actual VecSpecification's parentSheetOrChapter to.
* @return this assertion object.
* @throws AssertionError - if the actual VecSpecification's parentSheetOrChapter is not equal to the given one.
*/
public S hasParentSheetOrChapter(VecSheetOrChapter parentSheetOrChapter) {
// check that actual VecSpecification we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentSheetOrChapter of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecSheetOrChapter actualParentSheetOrChapter = actual.getParentSheetOrChapter();
if (!Objects.areEqual(actualParentSheetOrChapter, parentSheetOrChapter)) {
failWithMessage(assertjErrorMessage, actual, parentSheetOrChapter, actualParentSheetOrChapter);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy