
com.foursoft.vecmodel.vec120.AbstractVecPartStructureSpecificationAssert 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 VecPartStructureSpecification} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecPartStructureSpecificationAssert, A extends VecPartStructureSpecification> extends AbstractVecPartOrUsageRelatedSpecificationAssert {
/**
* Creates a new {@link AbstractVecPartStructureSpecificationAssert}
to make assertions on actual VecPartStructureSpecification.
* @param actual the VecPartStructureSpecification we want to make assertions on.
*/
protected AbstractVecPartStructureSpecificationAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecPartStructureSpecification's content is equal to the given one.
* @param content the given content to compare the actual VecPartStructureSpecification's content to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPartStructureSpecification's content is not equal to the given one.
*/
public S hasContent(String content) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting content of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualContent = actual.getContent();
if (!Objects.areEqual(actualContent, content)) {
failWithMessage(assertjErrorMessage, actual, content, actualContent);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's inBillOfMaterial contains the given VecOccurrenceOrUsage elements.
* @param inBillOfMaterial the given elements that should be contained in actual VecPartStructureSpecification's inBillOfMaterial.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's inBillOfMaterial does not contain all given VecOccurrenceOrUsage elements.
*/
public S hasInBillOfMaterial(VecOccurrenceOrUsage... inBillOfMaterial) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecOccurrenceOrUsage varargs is not null.
if (inBillOfMaterial == null) failWithMessage("Expecting inBillOfMaterial 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.getInBillOfMaterial(), inBillOfMaterial);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's inBillOfMaterial contains the given VecOccurrenceOrUsage elements in Collection.
* @param inBillOfMaterial the given elements that should be contained in actual VecPartStructureSpecification's inBillOfMaterial.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's inBillOfMaterial does not contain all given VecOccurrenceOrUsage elements.
*/
public S hasInBillOfMaterial(java.util.Collection extends VecOccurrenceOrUsage> inBillOfMaterial) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecOccurrenceOrUsage collection is not null.
if (inBillOfMaterial == null) {
failWithMessage("Expecting inBillOfMaterial 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.getInBillOfMaterial(), inBillOfMaterial.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's inBillOfMaterial contains only the given VecOccurrenceOrUsage elements and nothing else in whatever order.
* @param inBillOfMaterial the given elements that should be contained in actual VecPartStructureSpecification's inBillOfMaterial.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's inBillOfMaterial does not contain all given VecOccurrenceOrUsage elements.
*/
public S hasOnlyInBillOfMaterial(VecOccurrenceOrUsage... inBillOfMaterial) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecOccurrenceOrUsage varargs is not null.
if (inBillOfMaterial == null) failWithMessage("Expecting inBillOfMaterial 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.getInBillOfMaterial(), inBillOfMaterial);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's inBillOfMaterial contains only the given VecOccurrenceOrUsage elements in Collection and nothing else in whatever order.
* @param inBillOfMaterial the given elements that should be contained in actual VecPartStructureSpecification's inBillOfMaterial.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's inBillOfMaterial does not contain all given VecOccurrenceOrUsage elements.
*/
public S hasOnlyInBillOfMaterial(java.util.Collection extends VecOccurrenceOrUsage> inBillOfMaterial) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecOccurrenceOrUsage collection is not null.
if (inBillOfMaterial == null) {
failWithMessage("Expecting inBillOfMaterial 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.getInBillOfMaterial(), inBillOfMaterial.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's inBillOfMaterial does not contain the given VecOccurrenceOrUsage elements.
*
* @param inBillOfMaterial the given elements that should not be in actual VecPartStructureSpecification's inBillOfMaterial.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's inBillOfMaterial contains any given VecOccurrenceOrUsage elements.
*/
public S doesNotHaveInBillOfMaterial(VecOccurrenceOrUsage... inBillOfMaterial) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecOccurrenceOrUsage varargs is not null.
if (inBillOfMaterial == null) failWithMessage("Expecting inBillOfMaterial parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getInBillOfMaterial(), inBillOfMaterial);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's inBillOfMaterial does not contain the given VecOccurrenceOrUsage elements in Collection.
*
* @param inBillOfMaterial the given elements that should not be in actual VecPartStructureSpecification's inBillOfMaterial.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's inBillOfMaterial contains any given VecOccurrenceOrUsage elements.
*/
public S doesNotHaveInBillOfMaterial(java.util.Collection extends VecOccurrenceOrUsage> inBillOfMaterial) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecOccurrenceOrUsage collection is not null.
if (inBillOfMaterial == null) {
failWithMessage("Expecting inBillOfMaterial 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.getInBillOfMaterial(), inBillOfMaterial.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification has no inBillOfMaterial.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's inBillOfMaterial is not empty.
*/
public S hasNoInBillOfMaterial() {
// check that actual VecPartStructureSpecification 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 inBillOfMaterial but had :\n <%s>";
// check
if (actual.getInBillOfMaterial().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getInBillOfMaterial());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's refPartWithSubComponentsRole contains the given VecPartWithSubComponentsRole elements.
* @param refPartWithSubComponentsRole the given elements that should be contained in actual VecPartStructureSpecification's refPartWithSubComponentsRole.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's refPartWithSubComponentsRole does not contain all given VecPartWithSubComponentsRole elements.
*/
public S hasRefPartWithSubComponentsRole(VecPartWithSubComponentsRole... refPartWithSubComponentsRole) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecPartWithSubComponentsRole varargs is not null.
if (refPartWithSubComponentsRole == null) failWithMessage("Expecting refPartWithSubComponentsRole 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.getRefPartWithSubComponentsRole(), refPartWithSubComponentsRole);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's refPartWithSubComponentsRole contains the given VecPartWithSubComponentsRole elements in Collection.
* @param refPartWithSubComponentsRole the given elements that should be contained in actual VecPartStructureSpecification's refPartWithSubComponentsRole.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's refPartWithSubComponentsRole does not contain all given VecPartWithSubComponentsRole elements.
*/
public S hasRefPartWithSubComponentsRole(java.util.Collection extends VecPartWithSubComponentsRole> refPartWithSubComponentsRole) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecPartWithSubComponentsRole collection is not null.
if (refPartWithSubComponentsRole == null) {
failWithMessage("Expecting refPartWithSubComponentsRole 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.getRefPartWithSubComponentsRole(), refPartWithSubComponentsRole.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's refPartWithSubComponentsRole contains only the given VecPartWithSubComponentsRole elements and nothing else in whatever order.
* @param refPartWithSubComponentsRole the given elements that should be contained in actual VecPartStructureSpecification's refPartWithSubComponentsRole.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's refPartWithSubComponentsRole does not contain all given VecPartWithSubComponentsRole elements.
*/
public S hasOnlyRefPartWithSubComponentsRole(VecPartWithSubComponentsRole... refPartWithSubComponentsRole) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecPartWithSubComponentsRole varargs is not null.
if (refPartWithSubComponentsRole == null) failWithMessage("Expecting refPartWithSubComponentsRole 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.getRefPartWithSubComponentsRole(), refPartWithSubComponentsRole);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's refPartWithSubComponentsRole contains only the given VecPartWithSubComponentsRole elements in Collection and nothing else in whatever order.
* @param refPartWithSubComponentsRole the given elements that should be contained in actual VecPartStructureSpecification's refPartWithSubComponentsRole.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's refPartWithSubComponentsRole does not contain all given VecPartWithSubComponentsRole elements.
*/
public S hasOnlyRefPartWithSubComponentsRole(java.util.Collection extends VecPartWithSubComponentsRole> refPartWithSubComponentsRole) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecPartWithSubComponentsRole collection is not null.
if (refPartWithSubComponentsRole == null) {
failWithMessage("Expecting refPartWithSubComponentsRole 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.getRefPartWithSubComponentsRole(), refPartWithSubComponentsRole.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's refPartWithSubComponentsRole does not contain the given VecPartWithSubComponentsRole elements.
*
* @param refPartWithSubComponentsRole the given elements that should not be in actual VecPartStructureSpecification's refPartWithSubComponentsRole.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's refPartWithSubComponentsRole contains any given VecPartWithSubComponentsRole elements.
*/
public S doesNotHaveRefPartWithSubComponentsRole(VecPartWithSubComponentsRole... refPartWithSubComponentsRole) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecPartWithSubComponentsRole varargs is not null.
if (refPartWithSubComponentsRole == null) failWithMessage("Expecting refPartWithSubComponentsRole parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefPartWithSubComponentsRole(), refPartWithSubComponentsRole);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification's refPartWithSubComponentsRole does not contain the given VecPartWithSubComponentsRole elements in Collection.
*
* @param refPartWithSubComponentsRole the given elements that should not be in actual VecPartStructureSpecification's refPartWithSubComponentsRole.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's refPartWithSubComponentsRole contains any given VecPartWithSubComponentsRole elements.
*/
public S doesNotHaveRefPartWithSubComponentsRole(java.util.Collection extends VecPartWithSubComponentsRole> refPartWithSubComponentsRole) {
// check that actual VecPartStructureSpecification we want to make assertions on is not null.
isNotNull();
// check that given VecPartWithSubComponentsRole collection is not null.
if (refPartWithSubComponentsRole == null) {
failWithMessage("Expecting refPartWithSubComponentsRole 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.getRefPartWithSubComponentsRole(), refPartWithSubComponentsRole.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartStructureSpecification has no refPartWithSubComponentsRole.
* @return this assertion object.
* @throws AssertionError if the actual VecPartStructureSpecification's refPartWithSubComponentsRole is not empty.
*/
public S hasNoRefPartWithSubComponentsRole() {
// check that actual VecPartStructureSpecification 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 refPartWithSubComponentsRole but had :\n <%s>";
// check
if (actual.getRefPartWithSubComponentsRole().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefPartWithSubComponentsRole());
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy