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