
com.foursoft.vecmodel.vec120.AbstractVecPartRelationAssert 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.api.AbstractObjectAssert;
import org.assertj.core.internal.Iterables;
import org.assertj.core.util.Objects;
/**
* Abstract base class for {@link VecPartRelation} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecPartRelationAssert, A extends VecPartRelation> extends AbstractObjectAssert {
/**
* Creates a new {@link AbstractVecPartRelationAssert}
to make assertions on actual VecPartRelation.
* @param actual the VecPartRelation we want to make assertions on.
*/
protected AbstractVecPartRelationAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecPartRelation's accessoryPart contains the given VecPartVersion elements.
* @param accessoryPart the given elements that should be contained in actual VecPartRelation's accessoryPart.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's accessoryPart does not contain all given VecPartVersion elements.
*/
public S hasAccessoryPart(VecPartVersion... accessoryPart) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecPartVersion varargs is not null.
if (accessoryPart == null) failWithMessage("Expecting accessoryPart 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.getAccessoryPart(), accessoryPart);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's accessoryPart contains the given VecPartVersion elements in Collection.
* @param accessoryPart the given elements that should be contained in actual VecPartRelation's accessoryPart.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's accessoryPart does not contain all given VecPartVersion elements.
*/
public S hasAccessoryPart(java.util.Collection extends VecPartVersion> accessoryPart) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecPartVersion collection is not null.
if (accessoryPart == null) {
failWithMessage("Expecting accessoryPart 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.getAccessoryPart(), accessoryPart.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's accessoryPart contains only the given VecPartVersion elements and nothing else in whatever order.
* @param accessoryPart the given elements that should be contained in actual VecPartRelation's accessoryPart.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's accessoryPart does not contain all given VecPartVersion elements.
*/
public S hasOnlyAccessoryPart(VecPartVersion... accessoryPart) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecPartVersion varargs is not null.
if (accessoryPart == null) failWithMessage("Expecting accessoryPart 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.getAccessoryPart(), accessoryPart);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's accessoryPart contains only the given VecPartVersion elements in Collection and nothing else in whatever order.
* @param accessoryPart the given elements that should be contained in actual VecPartRelation's accessoryPart.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's accessoryPart does not contain all given VecPartVersion elements.
*/
public S hasOnlyAccessoryPart(java.util.Collection extends VecPartVersion> accessoryPart) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecPartVersion collection is not null.
if (accessoryPart == null) {
failWithMessage("Expecting accessoryPart 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.getAccessoryPart(), accessoryPart.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's accessoryPart does not contain the given VecPartVersion elements.
*
* @param accessoryPart the given elements that should not be in actual VecPartRelation's accessoryPart.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's accessoryPart contains any given VecPartVersion elements.
*/
public S doesNotHaveAccessoryPart(VecPartVersion... accessoryPart) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecPartVersion varargs is not null.
if (accessoryPart == null) failWithMessage("Expecting accessoryPart parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getAccessoryPart(), accessoryPart);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's accessoryPart does not contain the given VecPartVersion elements in Collection.
*
* @param accessoryPart the given elements that should not be in actual VecPartRelation's accessoryPart.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's accessoryPart contains any given VecPartVersion elements.
*/
public S doesNotHaveAccessoryPart(java.util.Collection extends VecPartVersion> accessoryPart) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecPartVersion collection is not null.
if (accessoryPart == null) {
failWithMessage("Expecting accessoryPart 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.getAccessoryPart(), accessoryPart.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation has no accessoryPart.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's accessoryPart is not empty.
*/
public S hasNoAccessoryPart() {
// check that actual VecPartRelation 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 accessoryPart but had :\n <%s>";
// check
if (actual.getAccessoryPart().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getAccessoryPart());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's customRelationExpression is equal to the given one.
* @param customRelationExpression the given customRelationExpression to compare the actual VecPartRelation's customRelationExpression to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPartRelation's customRelationExpression is not equal to the given one.
*/
public S hasCustomRelationExpression(String customRelationExpression) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting customRelationExpression of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualCustomRelationExpression = actual.getCustomRelationExpression();
if (!Objects.areEqual(actualCustomRelationExpression, customRelationExpression)) {
failWithMessage(assertjErrorMessage, actual, customRelationExpression, actualCustomRelationExpression);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's parentGeneralTechnicalPartSpecification is equal to the given one.
* @param parentGeneralTechnicalPartSpecification the given parentGeneralTechnicalPartSpecification to compare the actual VecPartRelation's parentGeneralTechnicalPartSpecification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPartRelation's parentGeneralTechnicalPartSpecification is not equal to the given one.
*/
public S hasParentGeneralTechnicalPartSpecification(VecGeneralTechnicalPartSpecification parentGeneralTechnicalPartSpecification) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentGeneralTechnicalPartSpecification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecGeneralTechnicalPartSpecification actualParentGeneralTechnicalPartSpecification = actual.getParentGeneralTechnicalPartSpecification();
if (!Objects.areEqual(actualParentGeneralTechnicalPartSpecification, parentGeneralTechnicalPartSpecification)) {
failWithMessage(assertjErrorMessage, actual, parentGeneralTechnicalPartSpecification, actualParentGeneralTechnicalPartSpecification);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refExtensionSlot contains the given VecExtensionSlot elements.
* @param refExtensionSlot the given elements that should be contained in actual VecPartRelation's refExtensionSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refExtensionSlot does not contain all given VecExtensionSlot elements.
*/
public S hasRefExtensionSlot(VecExtensionSlot... refExtensionSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecExtensionSlot varargs is not null.
if (refExtensionSlot == null) failWithMessage("Expecting refExtensionSlot 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.getRefExtensionSlot(), refExtensionSlot);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refExtensionSlot contains the given VecExtensionSlot elements in Collection.
* @param refExtensionSlot the given elements that should be contained in actual VecPartRelation's refExtensionSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refExtensionSlot does not contain all given VecExtensionSlot elements.
*/
public S hasRefExtensionSlot(java.util.Collection extends VecExtensionSlot> refExtensionSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecExtensionSlot collection is not null.
if (refExtensionSlot == null) {
failWithMessage("Expecting refExtensionSlot 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.getRefExtensionSlot(), refExtensionSlot.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refExtensionSlot contains only the given VecExtensionSlot elements and nothing else in whatever order.
* @param refExtensionSlot the given elements that should be contained in actual VecPartRelation's refExtensionSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refExtensionSlot does not contain all given VecExtensionSlot elements.
*/
public S hasOnlyRefExtensionSlot(VecExtensionSlot... refExtensionSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecExtensionSlot varargs is not null.
if (refExtensionSlot == null) failWithMessage("Expecting refExtensionSlot 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.getRefExtensionSlot(), refExtensionSlot);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refExtensionSlot contains only the given VecExtensionSlot elements in Collection and nothing else in whatever order.
* @param refExtensionSlot the given elements that should be contained in actual VecPartRelation's refExtensionSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refExtensionSlot does not contain all given VecExtensionSlot elements.
*/
public S hasOnlyRefExtensionSlot(java.util.Collection extends VecExtensionSlot> refExtensionSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecExtensionSlot collection is not null.
if (refExtensionSlot == null) {
failWithMessage("Expecting refExtensionSlot 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.getRefExtensionSlot(), refExtensionSlot.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refExtensionSlot does not contain the given VecExtensionSlot elements.
*
* @param refExtensionSlot the given elements that should not be in actual VecPartRelation's refExtensionSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refExtensionSlot contains any given VecExtensionSlot elements.
*/
public S doesNotHaveRefExtensionSlot(VecExtensionSlot... refExtensionSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecExtensionSlot varargs is not null.
if (refExtensionSlot == null) failWithMessage("Expecting refExtensionSlot parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefExtensionSlot(), refExtensionSlot);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refExtensionSlot does not contain the given VecExtensionSlot elements in Collection.
*
* @param refExtensionSlot the given elements that should not be in actual VecPartRelation's refExtensionSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refExtensionSlot contains any given VecExtensionSlot elements.
*/
public S doesNotHaveRefExtensionSlot(java.util.Collection extends VecExtensionSlot> refExtensionSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecExtensionSlot collection is not null.
if (refExtensionSlot == null) {
failWithMessage("Expecting refExtensionSlot 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.getRefExtensionSlot(), refExtensionSlot.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation has no refExtensionSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refExtensionSlot is not empty.
*/
public S hasNoRefExtensionSlot() {
// check that actual VecPartRelation 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 refExtensionSlot but had :\n <%s>";
// check
if (actual.getRefExtensionSlot().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefExtensionSlot());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refModularSlot contains the given VecModularSlot elements.
* @param refModularSlot the given elements that should be contained in actual VecPartRelation's refModularSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refModularSlot does not contain all given VecModularSlot elements.
*/
public S hasRefModularSlot(VecModularSlot... refModularSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecModularSlot varargs is not null.
if (refModularSlot == null) failWithMessage("Expecting refModularSlot 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.getRefModularSlot(), refModularSlot);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refModularSlot contains the given VecModularSlot elements in Collection.
* @param refModularSlot the given elements that should be contained in actual VecPartRelation's refModularSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refModularSlot does not contain all given VecModularSlot elements.
*/
public S hasRefModularSlot(java.util.Collection extends VecModularSlot> refModularSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecModularSlot collection is not null.
if (refModularSlot == null) {
failWithMessage("Expecting refModularSlot 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.getRefModularSlot(), refModularSlot.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refModularSlot contains only the given VecModularSlot elements and nothing else in whatever order.
* @param refModularSlot the given elements that should be contained in actual VecPartRelation's refModularSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refModularSlot does not contain all given VecModularSlot elements.
*/
public S hasOnlyRefModularSlot(VecModularSlot... refModularSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecModularSlot varargs is not null.
if (refModularSlot == null) failWithMessage("Expecting refModularSlot 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.getRefModularSlot(), refModularSlot);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refModularSlot contains only the given VecModularSlot elements in Collection and nothing else in whatever order.
* @param refModularSlot the given elements that should be contained in actual VecPartRelation's refModularSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refModularSlot does not contain all given VecModularSlot elements.
*/
public S hasOnlyRefModularSlot(java.util.Collection extends VecModularSlot> refModularSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecModularSlot collection is not null.
if (refModularSlot == null) {
failWithMessage("Expecting refModularSlot 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.getRefModularSlot(), refModularSlot.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refModularSlot does not contain the given VecModularSlot elements.
*
* @param refModularSlot the given elements that should not be in actual VecPartRelation's refModularSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refModularSlot contains any given VecModularSlot elements.
*/
public S doesNotHaveRefModularSlot(VecModularSlot... refModularSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecModularSlot varargs is not null.
if (refModularSlot == null) failWithMessage("Expecting refModularSlot parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefModularSlot(), refModularSlot);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refModularSlot does not contain the given VecModularSlot elements in Collection.
*
* @param refModularSlot the given elements that should not be in actual VecPartRelation's refModularSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refModularSlot contains any given VecModularSlot elements.
*/
public S doesNotHaveRefModularSlot(java.util.Collection extends VecModularSlot> refModularSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecModularSlot collection is not null.
if (refModularSlot == null) {
failWithMessage("Expecting refModularSlot 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.getRefModularSlot(), refModularSlot.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation has no refModularSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refModularSlot is not empty.
*/
public S hasNoRefModularSlot() {
// check that actual VecPartRelation 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 refModularSlot but had :\n <%s>";
// check
if (actual.getRefModularSlot().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefModularSlot());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refSlot contains the given VecSlot elements.
* @param refSlot the given elements that should be contained in actual VecPartRelation's refSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refSlot does not contain all given VecSlot elements.
*/
public S hasRefSlot(VecSlot... refSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecSlot varargs is not null.
if (refSlot == null) failWithMessage("Expecting refSlot 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.getRefSlot(), refSlot);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refSlot contains the given VecSlot elements in Collection.
* @param refSlot the given elements that should be contained in actual VecPartRelation's refSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refSlot does not contain all given VecSlot elements.
*/
public S hasRefSlot(java.util.Collection extends VecSlot> refSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecSlot collection is not null.
if (refSlot == null) {
failWithMessage("Expecting refSlot 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.getRefSlot(), refSlot.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refSlot contains only the given VecSlot elements and nothing else in whatever order.
* @param refSlot the given elements that should be contained in actual VecPartRelation's refSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refSlot does not contain all given VecSlot elements.
*/
public S hasOnlyRefSlot(VecSlot... refSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecSlot varargs is not null.
if (refSlot == null) failWithMessage("Expecting refSlot 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.getRefSlot(), refSlot);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refSlot contains only the given VecSlot elements in Collection and nothing else in whatever order.
* @param refSlot the given elements that should be contained in actual VecPartRelation's refSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refSlot does not contain all given VecSlot elements.
*/
public S hasOnlyRefSlot(java.util.Collection extends VecSlot> refSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecSlot collection is not null.
if (refSlot == null) {
failWithMessage("Expecting refSlot 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.getRefSlot(), refSlot.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refSlot does not contain the given VecSlot elements.
*
* @param refSlot the given elements that should not be in actual VecPartRelation's refSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refSlot contains any given VecSlot elements.
*/
public S doesNotHaveRefSlot(VecSlot... refSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecSlot varargs is not null.
if (refSlot == null) failWithMessage("Expecting refSlot parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefSlot(), refSlot);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's refSlot does not contain the given VecSlot elements in Collection.
*
* @param refSlot the given elements that should not be in actual VecPartRelation's refSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refSlot contains any given VecSlot elements.
*/
public S doesNotHaveRefSlot(java.util.Collection extends VecSlot> refSlot) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// check that given VecSlot collection is not null.
if (refSlot == null) {
failWithMessage("Expecting refSlot 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.getRefSlot(), refSlot.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation has no refSlot.
* @return this assertion object.
* @throws AssertionError if the actual VecPartRelation's refSlot is not empty.
*/
public S hasNoRefSlot() {
// check that actual VecPartRelation 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 refSlot but had :\n <%s>";
// check
if (actual.getRefSlot().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefSlot());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's relationType is equal to the given one.
* @param relationType the given relationType to compare the actual VecPartRelation's relationType to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPartRelation's relationType is not equal to the given one.
*/
public S hasRelationType(VecPartRelationType relationType) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting relationType of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecPartRelationType actualRelationType = actual.getRelationType();
if (!Objects.areEqual(actualRelationType, relationType)) {
failWithMessage(assertjErrorMessage, actual, relationType, actualRelationType);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecPartRelation's xmlId is equal to the given one.
* @param xmlId the given xmlId to compare the actual VecPartRelation's xmlId to.
* @return this assertion object.
* @throws AssertionError - if the actual VecPartRelation's xmlId is not equal to the given one.
*/
public S hasXmlId(String xmlId) {
// check that actual VecPartRelation we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting xmlId of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualXmlId = actual.getXmlId();
if (!Objects.areEqual(actualXmlId, xmlId)) {
failWithMessage(assertjErrorMessage, actual, xmlId, actualXmlId);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy