
com.foursoft.vecmodel.vec120.AbstractVecZoneAssignmentAssert 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 VecZoneAssignment} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecZoneAssignmentAssert, A extends VecZoneAssignment> extends AbstractObjectAssert {
/**
* Creates a new {@link AbstractVecZoneAssignmentAssert}
to make assertions on actual VecZoneAssignment.
* @param actual the VecZoneAssignment we want to make assertions on.
*/
protected AbstractVecZoneAssignmentAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecZoneAssignment's assignedSegment is equal to the given one.
* @param assignedSegment the given assignedSegment to compare the actual VecZoneAssignment's assignedSegment to.
* @return this assertion object.
* @throws AssertionError - if the actual VecZoneAssignment's assignedSegment is not equal to the given one.
*/
public S hasAssignedSegment(VecTopologySegment assignedSegment) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting assignedSegment of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecTopologySegment actualAssignedSegment = actual.getAssignedSegment();
if (!Objects.areEqual(actualAssignedSegment, assignedSegment)) {
failWithMessage(assertjErrorMessage, actual, assignedSegment, actualAssignedSegment);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment's coverages contains the given VecZoneCoverage elements.
* @param coverages the given elements that should be contained in actual VecZoneAssignment's coverages.
* @return this assertion object.
* @throws AssertionError if the actual VecZoneAssignment's coverages does not contain all given VecZoneCoverage elements.
*/
public S hasCoverages(VecZoneCoverage... coverages) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// check that given VecZoneCoverage varargs is not null.
if (coverages == null) failWithMessage("Expecting coverages 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.getCoverages(), coverages);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment's coverages contains the given VecZoneCoverage elements in Collection.
* @param coverages the given elements that should be contained in actual VecZoneAssignment's coverages.
* @return this assertion object.
* @throws AssertionError if the actual VecZoneAssignment's coverages does not contain all given VecZoneCoverage elements.
*/
public S hasCoverages(java.util.Collection extends VecZoneCoverage> coverages) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// check that given VecZoneCoverage collection is not null.
if (coverages == null) {
failWithMessage("Expecting coverages 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.getCoverages(), coverages.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment's coverages contains only the given VecZoneCoverage elements and nothing else in whatever order.
* @param coverages the given elements that should be contained in actual VecZoneAssignment's coverages.
* @return this assertion object.
* @throws AssertionError if the actual VecZoneAssignment's coverages does not contain all given VecZoneCoverage elements.
*/
public S hasOnlyCoverages(VecZoneCoverage... coverages) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// check that given VecZoneCoverage varargs is not null.
if (coverages == null) failWithMessage("Expecting coverages 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.getCoverages(), coverages);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment's coverages contains only the given VecZoneCoverage elements in Collection and nothing else in whatever order.
* @param coverages the given elements that should be contained in actual VecZoneAssignment's coverages.
* @return this assertion object.
* @throws AssertionError if the actual VecZoneAssignment's coverages does not contain all given VecZoneCoverage elements.
*/
public S hasOnlyCoverages(java.util.Collection extends VecZoneCoverage> coverages) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// check that given VecZoneCoverage collection is not null.
if (coverages == null) {
failWithMessage("Expecting coverages 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.getCoverages(), coverages.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment's coverages does not contain the given VecZoneCoverage elements.
*
* @param coverages the given elements that should not be in actual VecZoneAssignment's coverages.
* @return this assertion object.
* @throws AssertionError if the actual VecZoneAssignment's coverages contains any given VecZoneCoverage elements.
*/
public S doesNotHaveCoverages(VecZoneCoverage... coverages) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// check that given VecZoneCoverage varargs is not null.
if (coverages == null) failWithMessage("Expecting coverages parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getCoverages(), coverages);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment's coverages does not contain the given VecZoneCoverage elements in Collection.
*
* @param coverages the given elements that should not be in actual VecZoneAssignment's coverages.
* @return this assertion object.
* @throws AssertionError if the actual VecZoneAssignment's coverages contains any given VecZoneCoverage elements.
*/
public S doesNotHaveCoverages(java.util.Collection extends VecZoneCoverage> coverages) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// check that given VecZoneCoverage collection is not null.
if (coverages == null) {
failWithMessage("Expecting coverages 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.getCoverages(), coverages.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment has no coverages.
* @return this assertion object.
* @throws AssertionError if the actual VecZoneAssignment's coverages is not empty.
*/
public S hasNoCoverages() {
// check that actual VecZoneAssignment 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 coverages but had :\n <%s>";
// check
if (actual.getCoverages().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getCoverages());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment's parentTopologyZone is equal to the given one.
* @param parentTopologyZone the given parentTopologyZone to compare the actual VecZoneAssignment's parentTopologyZone to.
* @return this assertion object.
* @throws AssertionError - if the actual VecZoneAssignment's parentTopologyZone is not equal to the given one.
*/
public S hasParentTopologyZone(VecTopologyZone parentTopologyZone) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentTopologyZone of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecTopologyZone actualParentTopologyZone = actual.getParentTopologyZone();
if (!Objects.areEqual(actualParentTopologyZone, parentTopologyZone)) {
failWithMessage(assertjErrorMessage, actual, parentTopologyZone, actualParentTopologyZone);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment's parentZoneAssignment is equal to the given one.
* @param parentZoneAssignment the given parentZoneAssignment to compare the actual VecZoneAssignment's parentZoneAssignment to.
* @return this assertion object.
* @throws AssertionError - if the actual VecZoneAssignment's parentZoneAssignment is not equal to the given one.
*/
public S hasParentZoneAssignment(VecZoneAssignment parentZoneAssignment) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentZoneAssignment of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecZoneAssignment actualParentZoneAssignment = actual.getParentZoneAssignment();
if (!Objects.areEqual(actualParentZoneAssignment, parentZoneAssignment)) {
failWithMessage(assertjErrorMessage, actual, parentZoneAssignment, actualParentZoneAssignment);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecZoneAssignment's xmlId is equal to the given one.
* @param xmlId the given xmlId to compare the actual VecZoneAssignment's xmlId to.
* @return this assertion object.
* @throws AssertionError - if the actual VecZoneAssignment's xmlId is not equal to the given one.
*/
public S hasXmlId(String xmlId) {
// check that actual VecZoneAssignment 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;
}
/**
* Verifies that the actual VecZoneAssignment's zoneAssignment is equal to the given one.
* @param zoneAssignment the given zoneAssignment to compare the actual VecZoneAssignment's zoneAssignment to.
* @return this assertion object.
* @throws AssertionError - if the actual VecZoneAssignment's zoneAssignment is not equal to the given one.
*/
public S hasZoneAssignment(VecZoneAssignment zoneAssignment) {
// check that actual VecZoneAssignment we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting zoneAssignment of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecZoneAssignment actualZoneAssignment = actual.getZoneAssignment();
if (!Objects.areEqual(actualZoneAssignment, zoneAssignment)) {
failWithMessage(assertjErrorMessage, actual, zoneAssignment, actualZoneAssignment);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy