io.fabric8.kubernetes.api.model.AbstractNodeStatusAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of assertions Show documentation
Show all versions of assertions Show documentation
A port of Kubernetes Assertions Library by Fabric8
package io.fabric8.kubernetes.api.model;
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.AssertFactory;
import com.stakater.kubernetes.assertions.NavigationListAssert;
import static org.assertj.core.api.Assertions.assertThat;
import static io.fabric8.kubernetes.assertions.internal.Assertions.assertThat;
/**
* Abstract base class for {@link NodeStatus} specific assertions - Generated by CustomAssertionGenerator.
*/
public abstract class AbstractNodeStatusAssert, A extends NodeStatus> extends AbstractAssert {
/**
* Creates a new {@link AbstractNodeStatusAssert}
to make assertions on actual NodeStatus.
* @param actual the NodeStatus we want to make assertions on.
*/
protected AbstractNodeStatusAssert(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 NodeStatus 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(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "additionalProperties"));
}
/**
* Navigates to the property addresses so that assertions can be done on it
*/
public NavigationListAssert addresses() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public NodeAddressAssert createAssert(NodeAddress t) {
return (NodeAddressAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getAddresses(), assertFactory);
answer.describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "addresses"));
return answer;
}
/**
* Navigates to the property allocatable so that assertions can be done on it
*/
public org.assertj.core.api.MapAssert allocatable() {
// check that actual NodeStatus we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.MapAssert) assertThat(actual.getAllocatable()).describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "allocatable"));
}
/**
* Navigates to the property capacity so that assertions can be done on it
*/
public org.assertj.core.api.MapAssert capacity() {
// check that actual NodeStatus we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.MapAssert) assertThat(actual.getCapacity()).describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "capacity"));
}
/**
* Navigates to the property conditions so that assertions can be done on it
*/
public NavigationListAssert conditions() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public NodeConditionAssert createAssert(NodeCondition t) {
return (NodeConditionAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getConditions(), assertFactory);
answer.describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "conditions"));
return answer;
}
/**
* Navigates to the property daemonEndpoints so that assertions can be done on it
*/
public NodeDaemonEndpointsAssert daemonEndpoints() {
// check that actual NodeStatus we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (NodeDaemonEndpointsAssert) assertThat(actual.getDaemonEndpoints()).describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "daemonEndpoints"));
}
/**
* Navigates to the property images so that assertions can be done on it
*/
public NavigationListAssert images() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public ContainerImageAssert createAssert(ContainerImage t) {
return (ContainerImageAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getImages(), assertFactory);
answer.describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "images"));
return answer;
}
/**
* Navigates to the property nodeInfo so that assertions can be done on it
*/
public NodeSystemInfoAssert nodeInfo() {
// check that actual NodeStatus we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (NodeSystemInfoAssert) assertThat(actual.getNodeInfo()).describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "nodeInfo"));
}
/**
* Navigates to the property phase so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert phase() {
// check that actual NodeStatus we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getPhase()).describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "phase"));
}
/**
* Navigates to the property volumesAttached so that assertions can be done on it
*/
public NavigationListAssert volumesAttached() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public AttachedVolumeAssert createAssert(AttachedVolume t) {
return (AttachedVolumeAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getVolumesAttached(), assertFactory);
answer.describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "volumesAttached"));
return answer;
}
/**
* Navigates to the property volumesInUse so that assertions can be done on it
*/
public NavigationListAssert volumesInUse() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public org.assertj.core.api.StringAssert createAssert(String t) {
return (org.assertj.core.api.StringAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getVolumesInUse(), assertFactory);
answer.describedAs(com.stakater.kubernetes.assertions.Assertions.joinDescription(this, "volumesInUse"));
return answer;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy