
com.foursoft.vecmodel.vec120.AbstractVecAbstractLocalizedStringAssert 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.util.Objects;
/**
* Abstract base class for {@link VecAbstractLocalizedString} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractVecAbstractLocalizedStringAssert, A extends VecAbstractLocalizedString> extends AbstractObjectAssert {
/**
* Creates a new {@link AbstractVecAbstractLocalizedStringAssert}
to make assertions on actual VecAbstractLocalizedString.
* @param actual the VecAbstractLocalizedString we want to make assertions on.
*/
protected AbstractVecAbstractLocalizedStringAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual VecAbstractLocalizedString's languageCode is equal to the given one.
* @param languageCode the given languageCode to compare the actual VecAbstractLocalizedString's languageCode to.
* @return this assertion object.
* @throws AssertionError - if the actual VecAbstractLocalizedString's languageCode is not equal to the given one.
*/
public S hasLanguageCode(VecLanguageCode languageCode) {
// check that actual VecAbstractLocalizedString we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting languageCode of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
VecLanguageCode actualLanguageCode = actual.getLanguageCode();
if (!Objects.areEqual(actualLanguageCode, languageCode)) {
failWithMessage(assertjErrorMessage, actual, languageCode, actualLanguageCode);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecAbstractLocalizedString's value is equal to the given one.
* @param value the given value to compare the actual VecAbstractLocalizedString's value to.
* @return this assertion object.
* @throws AssertionError - if the actual VecAbstractLocalizedString's value is not equal to the given one.
*/
public S hasValue(String value) {
// check that actual VecAbstractLocalizedString we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting value of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
String actualValue = actual.getValue();
if (!Objects.areEqual(actualValue, value)) {
failWithMessage(assertjErrorMessage, actual, value, actualValue);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual VecAbstractLocalizedString's xmlId is equal to the given one.
* @param xmlId the given xmlId to compare the actual VecAbstractLocalizedString's xmlId to.
* @return this assertion object.
* @throws AssertionError - if the actual VecAbstractLocalizedString's xmlId is not equal to the given one.
*/
public S hasXmlId(String xmlId) {
// check that actual VecAbstractLocalizedString 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;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy