
com.foursoft.vecmodel.vec120.AbstractVecNetAssert 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 VecNet} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecNetAssert, A extends VecNet> extends AbstractVecConfigurableElementAssert {
/**
* Creates a new {@link AbstractVecNetAssert}
to make assertions on actual VecNet.
* @param actual the VecNet we want to make assertions on.
*/
protected AbstractVecNetAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecNet's descriptions contains the given VecAbstractLocalizedString elements.
* @param descriptions the given elements that should be contained in actual VecNet's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's descriptions does not contain all given VecAbstractLocalizedString elements.
*/
public S hasDescriptions(VecAbstractLocalizedString... descriptions) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString varargs is not null.
if (descriptions == null) failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's descriptions contains the given VecAbstractLocalizedString elements in Collection.
* @param descriptions the given elements that should be contained in actual VecNet's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's descriptions does not contain all given VecAbstractLocalizedString elements.
*/
public S hasDescriptions(java.util.Collection extends VecAbstractLocalizedString> descriptions) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString collection is not null.
if (descriptions == null) {
failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's descriptions contains only the given VecAbstractLocalizedString elements and nothing else in whatever order.
* @param descriptions the given elements that should be contained in actual VecNet's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's descriptions does not contain all given VecAbstractLocalizedString elements.
*/
public S hasOnlyDescriptions(VecAbstractLocalizedString... descriptions) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString varargs is not null.
if (descriptions == null) failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's descriptions contains only the given VecAbstractLocalizedString elements in Collection and nothing else in whatever order.
* @param descriptions the given elements that should be contained in actual VecNet's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's descriptions does not contain all given VecAbstractLocalizedString elements.
*/
public S hasOnlyDescriptions(java.util.Collection extends VecAbstractLocalizedString> descriptions) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString collection is not null.
if (descriptions == null) {
failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's descriptions does not contain the given VecAbstractLocalizedString elements.
*
* @param descriptions the given elements that should not be in actual VecNet's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's descriptions contains any given VecAbstractLocalizedString elements.
*/
public S doesNotHaveDescriptions(VecAbstractLocalizedString... descriptions) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString varargs is not null.
if (descriptions == null) failWithMessage("Expecting descriptions parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getDescriptions(), descriptions);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's descriptions does not contain the given VecAbstractLocalizedString elements in Collection.
*
* @param descriptions the given elements that should not be in actual VecNet's descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's descriptions contains any given VecAbstractLocalizedString elements.
*/
public S doesNotHaveDescriptions(java.util.Collection extends VecAbstractLocalizedString> descriptions) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecAbstractLocalizedString collection is not null.
if (descriptions == null) {
failWithMessage("Expecting descriptions 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.getDescriptions(), descriptions.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet has no descriptions.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's descriptions is not empty.
*/
public S hasNoDescriptions() {
// check that actual VecNet 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 descriptions but had :\n <%s>";
// check
if (actual.getDescriptions().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getDescriptions());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's identification is equal to the given one.
* @param identification the given identification to compare the actual VecNet's identification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecNet's identification is not equal to the given one.
*/
public S hasIdentification(String identification) {
// check that actual VecNet 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 VecNet's netType is equal to the given one.
* @param netType the given netType to compare the actual VecNet's netType to.
* @return this assertion object.
* @throws AssertionError - if the actual VecNet's netType is not equal to the given one.
*/
public S hasNetType(VecNetType netType) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting netType of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecNetType actualNetType = actual.getNetType();
if (!Objects.areEqual(actualNetType, netType)) {
failWithMessage(assertjErrorMessage, actual, netType, actualNetType);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's networkPort contains the given VecNetworkPort elements.
* @param networkPort the given elements that should be contained in actual VecNet's networkPort.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's networkPort does not contain all given VecNetworkPort elements.
*/
public S hasNetworkPort(VecNetworkPort... networkPort) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetworkPort varargs is not null.
if (networkPort == null) failWithMessage("Expecting networkPort 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.getNetworkPort(), networkPort);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's networkPort contains the given VecNetworkPort elements in Collection.
* @param networkPort the given elements that should be contained in actual VecNet's networkPort.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's networkPort does not contain all given VecNetworkPort elements.
*/
public S hasNetworkPort(java.util.Collection extends VecNetworkPort> networkPort) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetworkPort collection is not null.
if (networkPort == null) {
failWithMessage("Expecting networkPort 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.getNetworkPort(), networkPort.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's networkPort contains only the given VecNetworkPort elements and nothing else in whatever order.
* @param networkPort the given elements that should be contained in actual VecNet's networkPort.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's networkPort does not contain all given VecNetworkPort elements.
*/
public S hasOnlyNetworkPort(VecNetworkPort... networkPort) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetworkPort varargs is not null.
if (networkPort == null) failWithMessage("Expecting networkPort 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.getNetworkPort(), networkPort);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's networkPort contains only the given VecNetworkPort elements in Collection and nothing else in whatever order.
* @param networkPort the given elements that should be contained in actual VecNet's networkPort.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's networkPort does not contain all given VecNetworkPort elements.
*/
public S hasOnlyNetworkPort(java.util.Collection extends VecNetworkPort> networkPort) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetworkPort collection is not null.
if (networkPort == null) {
failWithMessage("Expecting networkPort 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.getNetworkPort(), networkPort.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's networkPort does not contain the given VecNetworkPort elements.
*
* @param networkPort the given elements that should not be in actual VecNet's networkPort.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's networkPort contains any given VecNetworkPort elements.
*/
public S doesNotHaveNetworkPort(VecNetworkPort... networkPort) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetworkPort varargs is not null.
if (networkPort == null) failWithMessage("Expecting networkPort parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getNetworkPort(), networkPort);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's networkPort does not contain the given VecNetworkPort elements in Collection.
*
* @param networkPort the given elements that should not be in actual VecNet's networkPort.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's networkPort contains any given VecNetworkPort elements.
*/
public S doesNotHaveNetworkPort(java.util.Collection extends VecNetworkPort> networkPort) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetworkPort collection is not null.
if (networkPort == null) {
failWithMessage("Expecting networkPort 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.getNetworkPort(), networkPort.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet has no networkPort.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's networkPort is not empty.
*/
public S hasNoNetworkPort() {
// check that actual VecNet 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 networkPort but had :\n <%s>";
// check
if (actual.getNetworkPort().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getNetworkPort());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's parentNetSpecification is equal to the given one.
* @param parentNetSpecification the given parentNetSpecification to compare the actual VecNet's parentNetSpecification to.
* @return this assertion object.
* @throws AssertionError - if the actual VecNet's parentNetSpecification is not equal to the given one.
*/
public S hasParentNetSpecification(VecNetSpecification parentNetSpecification) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting parentNetSpecification of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecNetSpecification actualParentNetSpecification = actual.getParentNetSpecification();
if (!Objects.areEqual(actualParentNetSpecification, parentNetSpecification)) {
failWithMessage(assertjErrorMessage, actual, parentNetSpecification, actualParentNetSpecification);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refConnection contains the given VecConnection elements.
* @param refConnection the given elements that should be contained in actual VecNet's refConnection.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refConnection does not contain all given VecConnection elements.
*/
public S hasRefConnection(VecConnection... refConnection) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecConnection varargs is not null.
if (refConnection == null) failWithMessage("Expecting refConnection 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.getRefConnection(), refConnection);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refConnection contains the given VecConnection elements in Collection.
* @param refConnection the given elements that should be contained in actual VecNet's refConnection.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refConnection does not contain all given VecConnection elements.
*/
public S hasRefConnection(java.util.Collection extends VecConnection> refConnection) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecConnection collection is not null.
if (refConnection == null) {
failWithMessage("Expecting refConnection 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.getRefConnection(), refConnection.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refConnection contains only the given VecConnection elements and nothing else in whatever order.
* @param refConnection the given elements that should be contained in actual VecNet's refConnection.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refConnection does not contain all given VecConnection elements.
*/
public S hasOnlyRefConnection(VecConnection... refConnection) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecConnection varargs is not null.
if (refConnection == null) failWithMessage("Expecting refConnection 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.getRefConnection(), refConnection);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refConnection contains only the given VecConnection elements in Collection and nothing else in whatever order.
* @param refConnection the given elements that should be contained in actual VecNet's refConnection.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refConnection does not contain all given VecConnection elements.
*/
public S hasOnlyRefConnection(java.util.Collection extends VecConnection> refConnection) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecConnection collection is not null.
if (refConnection == null) {
failWithMessage("Expecting refConnection 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.getRefConnection(), refConnection.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refConnection does not contain the given VecConnection elements.
*
* @param refConnection the given elements that should not be in actual VecNet's refConnection.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refConnection contains any given VecConnection elements.
*/
public S doesNotHaveRefConnection(VecConnection... refConnection) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecConnection varargs is not null.
if (refConnection == null) failWithMessage("Expecting refConnection parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefConnection(), refConnection);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refConnection does not contain the given VecConnection elements in Collection.
*
* @param refConnection the given elements that should not be in actual VecNet's refConnection.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refConnection contains any given VecConnection elements.
*/
public S doesNotHaveRefConnection(java.util.Collection extends VecConnection> refConnection) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecConnection collection is not null.
if (refConnection == null) {
failWithMessage("Expecting refConnection 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.getRefConnection(), refConnection.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet has no refConnection.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refConnection is not empty.
*/
public S hasNoRefConnection() {
// check that actual VecNet 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 refConnection but had :\n <%s>";
// check
if (actual.getRefConnection().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefConnection());
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refNetGroup contains the given VecNetGroup elements.
* @param refNetGroup the given elements that should be contained in actual VecNet's refNetGroup.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refNetGroup does not contain all given VecNetGroup elements.
*/
public S hasRefNetGroup(VecNetGroup... refNetGroup) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetGroup varargs is not null.
if (refNetGroup == null) failWithMessage("Expecting refNetGroup 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.getRefNetGroup(), refNetGroup);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refNetGroup contains the given VecNetGroup elements in Collection.
* @param refNetGroup the given elements that should be contained in actual VecNet's refNetGroup.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refNetGroup does not contain all given VecNetGroup elements.
*/
public S hasRefNetGroup(java.util.Collection extends VecNetGroup> refNetGroup) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetGroup collection is not null.
if (refNetGroup == null) {
failWithMessage("Expecting refNetGroup 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.getRefNetGroup(), refNetGroup.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refNetGroup contains only the given VecNetGroup elements and nothing else in whatever order.
* @param refNetGroup the given elements that should be contained in actual VecNet's refNetGroup.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refNetGroup does not contain all given VecNetGroup elements.
*/
public S hasOnlyRefNetGroup(VecNetGroup... refNetGroup) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetGroup varargs is not null.
if (refNetGroup == null) failWithMessage("Expecting refNetGroup 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.getRefNetGroup(), refNetGroup);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refNetGroup contains only the given VecNetGroup elements in Collection and nothing else in whatever order.
* @param refNetGroup the given elements that should be contained in actual VecNet's refNetGroup.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refNetGroup does not contain all given VecNetGroup elements.
*/
public S hasOnlyRefNetGroup(java.util.Collection extends VecNetGroup> refNetGroup) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetGroup collection is not null.
if (refNetGroup == null) {
failWithMessage("Expecting refNetGroup 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.getRefNetGroup(), refNetGroup.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refNetGroup does not contain the given VecNetGroup elements.
*
* @param refNetGroup the given elements that should not be in actual VecNet's refNetGroup.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refNetGroup contains any given VecNetGroup elements.
*/
public S doesNotHaveRefNetGroup(VecNetGroup... refNetGroup) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetGroup varargs is not null.
if (refNetGroup == null) failWithMessage("Expecting refNetGroup parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
Iterables.instance().assertDoesNotContain(info, actual.getRefNetGroup(), refNetGroup);
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet's refNetGroup does not contain the given VecNetGroup elements in Collection.
*
* @param refNetGroup the given elements that should not be in actual VecNet's refNetGroup.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refNetGroup contains any given VecNetGroup elements.
*/
public S doesNotHaveRefNetGroup(java.util.Collection extends VecNetGroup> refNetGroup) {
// check that actual VecNet we want to make assertions on is not null.
isNotNull();
// check that given VecNetGroup collection is not null.
if (refNetGroup == null) {
failWithMessage("Expecting refNetGroup 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.getRefNetGroup(), refNetGroup.toArray());
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecNet has no refNetGroup.
* @return this assertion object.
* @throws AssertionError if the actual VecNet's refNetGroup is not empty.
*/
public S hasNoRefNetGroup() {
// check that actual VecNet 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 refNetGroup but had :\n <%s>";
// check
if (actual.getRefNetGroup().iterator().hasNext()) {
failWithMessage(assertjErrorMessage, actual, actual.getRefNetGroup());
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy