
io.zeebe.protocol.record.intent.AbstractIncidentIntentAssert Maven / Gradle / Ivy
package io.zeebe.protocol.record.intent;
import org.assertj.core.api.AbstractComparableAssert;
/**
* Abstract base class for {@link IncidentIntent} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractIncidentIntentAssert, A extends IncidentIntent> extends AbstractComparableAssert {
/**
* Creates a new {@link AbstractIncidentIntentAssert}
to make assertions on actual IncidentIntent.
* @param actual the IncidentIntent we want to make assertions on.
*/
protected AbstractIncidentIntentAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual IncidentIntent should blacklist instance on error.
* @return this assertion object.
* @throws AssertionError - if the actual IncidentIntent should not blacklist instance on error.
*/
public S shouldBlacklistInstanceOnError() {
// check that actual IncidentIntent we want to make assertions on is not null.
isNotNull();
// check that property call/field access is true
if (!actual.shouldBlacklistInstanceOnError()) {
failWithMessage("\nExpecting that actual IncidentIntent should blacklist instance on error but should not.");
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual IncidentIntent should not blacklist instance on error.
* @return this assertion object.
* @throws AssertionError - if the actual IncidentIntent should blacklist instance on error.
*/
public S shouldNotBlacklistInstanceOnError() {
// check that actual IncidentIntent we want to make assertions on is not null.
isNotNull();
// check that property call/field access is false
if (actual.shouldBlacklistInstanceOnError()) {
failWithMessage("\nExpecting that actual IncidentIntent should not blacklist instance on error but should.");
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual IncidentIntent's intent is equal to the given one.
* @param intent the given intent to compare the actual IncidentIntent's intent to.
* @return this assertion object.
* @throws AssertionError - if the actual IncidentIntent's intent is not equal to the given one.
*/
public S hasIntent(short intent) {
// check that actual IncidentIntent we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting intent of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// check
short actualIntent = actual.getIntent();
if (actualIntent != intent) {
failWithMessage(assertjErrorMessage, actual, intent, actualIntent);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy