io.fabric8.kubernetes.api.model.extensions.AbstractDaemonSetStatusAssert Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model.extensions;
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.Assertions;
import org.assertj.core.util.Objects;
import io.fabric8.kubernetes.assertions.AssertFactory;
import io.fabric8.kubernetes.assertions.NavigationListAssert;
import static org.assertj.core.api.Assertions.assertThat;
import static io.fabric8.kubernetes.assertions.internal.Assertions.assertThat;
import static io.fabric8.openshift.assertions.Assertions.assertThat;
/**
* Abstract base class for {@link DaemonSetStatus} specific assertions - Generated by CustomAssertionGenerator.
*/
public abstract class AbstractDaemonSetStatusAssert, A extends DaemonSetStatus> extends AbstractAssert {
/**
* Creates a new {@link AbstractDaemonSetStatusAssert}
to make assertions on actual DaemonSetStatus.
* @param actual the DaemonSetStatus we want to make assertions on.
*/
protected AbstractDaemonSetStatusAssert(A actual, Class selfType) {
super(actual, selfType);
}
/**
* Navigates to the property additionalProperties so that assertions can be done on it
*/
public org.assertj.core.api.MapAssert additionalProperties() {
// check that actual DaemonSetStatus we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.MapAssert) assertThat(actual.getAdditionalProperties()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "additionalProperties"));
}
/**
* Verifies that the actual DaemonSetStatus's currentNumberScheduled is equal to the given one.
* @param currentNumberScheduled the given currentNumberScheduled to compare the actual DaemonSetStatus's currentNumberScheduled to.
* @return this assertion object.
* @throws AssertionError - if the actual DaemonSetStatus's currentNumberScheduled is not equal to the given one.
*/
public S hasCurrentNumberScheduled(Integer currentNumberScheduled) {
// check that actual DaemonSetStatus we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting currentNumberScheduled of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
Integer actualCurrentNumberScheduled = actual.getCurrentNumberScheduled();
if (!Objects.areEqual(actualCurrentNumberScheduled, currentNumberScheduled)) {
failWithMessage(assertjErrorMessage, actual, currentNumberScheduled, actualCurrentNumberScheduled);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual DaemonSetStatus's desiredNumberScheduled is equal to the given one.
* @param desiredNumberScheduled the given desiredNumberScheduled to compare the actual DaemonSetStatus's desiredNumberScheduled to.
* @return this assertion object.
* @throws AssertionError - if the actual DaemonSetStatus's desiredNumberScheduled is not equal to the given one.
*/
public S hasDesiredNumberScheduled(Integer desiredNumberScheduled) {
// check that actual DaemonSetStatus we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting desiredNumberScheduled of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
Integer actualDesiredNumberScheduled = actual.getDesiredNumberScheduled();
if (!Objects.areEqual(actualDesiredNumberScheduled, desiredNumberScheduled)) {
failWithMessage(assertjErrorMessage, actual, desiredNumberScheduled, actualDesiredNumberScheduled);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual DaemonSetStatus's numberMisscheduled is equal to the given one.
* @param numberMisscheduled the given numberMisscheduled to compare the actual DaemonSetStatus's numberMisscheduled to.
* @return this assertion object.
* @throws AssertionError - if the actual DaemonSetStatus's numberMisscheduled is not equal to the given one.
*/
public S hasNumberMisscheduled(Integer numberMisscheduled) {
// check that actual DaemonSetStatus we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting numberMisscheduled of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
Integer actualNumberMisscheduled = actual.getNumberMisscheduled();
if (!Objects.areEqual(actualNumberMisscheduled, numberMisscheduled)) {
failWithMessage(assertjErrorMessage, actual, numberMisscheduled, actualNumberMisscheduled);
}
// return the current assertion for method chaining
return myself;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy