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