
com.foursoft.vecmodel.vec120.AbstractVecGeometrySegmentAssert 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 VecGeometrySegment} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecGeometrySegmentAssert, A extends VecGeometrySegment> extends AbstractVecConfigurableElementAssert {
/**
* Creates a new {@link AbstractVecGeometrySegmentAssert}
to make assertions on actual VecGeometrySegment.
* @param actual the VecGeometrySegment we want to make assertions on.
*/
protected AbstractVecGeometrySegmentAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecGeometrySegment's aliasIds contains the given VecAliasIdentification elements.
* @param aliasIds the given elements that should be contained in actual VecGeometrySegment's aliasIds.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment's aliasIds does not contain all given VecAliasIdentification elements.
*/
public S hasAliasIds(VecAliasIdentification... aliasIds) {
// check that actual VecGeometrySegment we want to make assertions on is not null.
isNotNull();
// check that given VecAliasIdentification varargs is not null.
if (aliasIds == null) failWithMessage("Expecting aliasIds 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.getAliasIds(), aliasIds);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment's aliasIds contains the given VecAliasIdentification elements in Collection.
* @param aliasIds the given elements that should be contained in actual VecGeometrySegment's aliasIds.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment's aliasIds does not contain all given VecAliasIdentification elements.
*/
public S hasAliasIds(java.util.Collection extends VecAliasIdentification> aliasIds) {
// check that actual VecGeometrySegment we want to make assertions on is not null.
isNotNull();
// check that given VecAliasIdentification collection is not null.
if (aliasIds == null) {
failWithMessage("Expecting aliasIds 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.getAliasIds(), aliasIds.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment's aliasIds contains only the given VecAliasIdentification elements and nothing else in whatever order.
* @param aliasIds the given elements that should be contained in actual VecGeometrySegment's aliasIds.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment's aliasIds does not contain all given VecAliasIdentification elements.
*/
public S hasOnlyAliasIds(VecAliasIdentification... aliasIds) {
// check that actual VecGeometrySegment we want to make assertions on is not null.
isNotNull();
// check that given VecAliasIdentification varargs is not null.
if (aliasIds == null) failWithMessage("Expecting aliasIds 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.getAliasIds(), aliasIds);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment's aliasIds contains only the given VecAliasIdentification elements in Collection and nothing else in whatever order.
* @param aliasIds the given elements that should be contained in actual VecGeometrySegment's aliasIds.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment's aliasIds does not contain all given VecAliasIdentification elements.
*/
public S hasOnlyAliasIds(java.util.Collection extends VecAliasIdentification> aliasIds) {
// check that actual VecGeometrySegment we want to make assertions on is not null.
isNotNull();
// check that given VecAliasIdentification collection is not null.
if (aliasIds == null) {
failWithMessage("Expecting aliasIds 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.getAliasIds(), aliasIds.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment's aliasIds does not contain the given VecAliasIdentification elements.
*
* @param aliasIds the given elements that should not be in actual VecGeometrySegment's aliasIds.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment's aliasIds contains any given VecAliasIdentification elements.
*/
public S doesNotHaveAliasIds(VecAliasIdentification... aliasIds) {
// check that actual VecGeometrySegment we want to make assertions on is not null.
isNotNull();
// check that given VecAliasIdentification varargs is not null.
if (aliasIds == null) failWithMessage("Expecting aliasIds parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getAliasIds(), aliasIds);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment's aliasIds does not contain the given VecAliasIdentification elements in Collection.
*
* @param aliasIds the given elements that should not be in actual VecGeometrySegment's aliasIds.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment's aliasIds contains any given VecAliasIdentification elements.
*/
public S doesNotHaveAliasIds(java.util.Collection extends VecAliasIdentification> aliasIds) {
// check that actual VecGeometrySegment we want to make assertions on is not null.
isNotNull();
// check that given VecAliasIdentification collection is not null.
if (aliasIds == null) {
failWithMessage("Expecting aliasIds 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.getAliasIds(), aliasIds.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment has no aliasIds.
* @return this assertion object.
* @throws AssertionError if the actual VecGeometrySegment's aliasIds is not empty.
*/
public S hasNoAliasIds() {
// check that actual VecGeometrySegment 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 aliasIds but had :\n <%s>";
// check
if (actual.getAliasIds().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getAliasIds());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment's identification is equal to the given one.
* @param identification the given identification to compare the actual VecGeometrySegment's identification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecGeometrySegment's identification is not equal to the given one.
*/
public S hasIdentification(String identification) {
// check that actual VecGeometrySegment we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting identification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualIdentification = actual.getIdentification();
if (!Objects.areEqual(actualIdentification, identification)) {
failWithMessage(assertjErrorMessage, actual, identification, actualIdentification);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecGeometrySegment's referenceSegment is equal to the given one.
* @param referenceSegment the given referenceSegment to compare the actual VecGeometrySegment's referenceSegment to.
* @return this assertion object.
* @throws AssertionError - if the actual VecGeometrySegment's referenceSegment is not equal to the given one.
*/
public S hasReferenceSegment(VecTopologySegment referenceSegment) {
// check that actual VecGeometrySegment we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting referenceSegment of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecTopologySegment actualReferenceSegment = actual.getReferenceSegment();
if (!Objects.areEqual(actualReferenceSegment, referenceSegment)) {
failWithMessage(assertjErrorMessage, actual, referenceSegment, actualReferenceSegment);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy