io.fabric8.kubernetes.api.model.AbstractContainerAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes-assertions
Show all versions of kubernetes-assertions
This library provides a bunch of helpful assertj assertions for working with the kubernetes-api.
The newest version!
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 io.fabric8.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 Container} specific assertions - Generated by CustomAssertionGenerator.
*/
public abstract class AbstractContainerAssert, A extends Container> extends AbstractAssert {
/**
* Creates a new {@link AbstractContainerAssert}
to make assertions on actual Container.
* @param actual the Container we want to make assertions on.
*/
protected AbstractContainerAssert(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 Container 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"));
}
/**
* Navigates to the property args so that assertions can be done on it
*/
public NavigationListAssert args() {
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.getArgs(), assertFactory);
answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "args"));
return answer;
}
/**
* Navigates to the property command so that assertions can be done on it
*/
public NavigationListAssert command() {
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.getCommand(), assertFactory);
answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "command"));
return answer;
}
/**
* Navigates to the property env so that assertions can be done on it
*/
public NavigationListAssert env() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public EnvVarAssert createAssert(EnvVar t) {
return (EnvVarAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getEnv(), assertFactory);
answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "env"));
return answer;
}
/**
* Navigates to the property envFrom so that assertions can be done on it
*/
public NavigationListAssert envFrom() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public EnvFromSourceAssert createAssert(EnvFromSource t) {
return (EnvFromSourceAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getEnvFrom(), assertFactory);
answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "envFrom"));
return answer;
}
/**
* Navigates to the property image so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert image() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getImage()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "image"));
}
/**
* Navigates to the property imagePullPolicy so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert imagePullPolicy() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getImagePullPolicy()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "imagePullPolicy"));
}
/**
* Navigates to the property lifecycle so that assertions can be done on it
*/
public LifecycleAssert lifecycle() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (LifecycleAssert) assertThat(actual.getLifecycle()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "lifecycle"));
}
/**
* Navigates to the property livenessProbe so that assertions can be done on it
*/
public ProbeAssert livenessProbe() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (ProbeAssert) assertThat(actual.getLivenessProbe()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "livenessProbe"));
}
/**
* Navigates to the property name so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert name() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getName()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "name"));
}
/**
* Navigates to the property ports so that assertions can be done on it
*/
public NavigationListAssert ports() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public ContainerPortAssert createAssert(ContainerPort t) {
return (ContainerPortAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getPorts(), assertFactory);
answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "ports"));
return answer;
}
/**
* Navigates to the property readinessProbe so that assertions can be done on it
*/
public ProbeAssert readinessProbe() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (ProbeAssert) assertThat(actual.getReadinessProbe()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "readinessProbe"));
}
/**
* Navigates to the property resources so that assertions can be done on it
*/
public ResourceRequirementsAssert resources() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (ResourceRequirementsAssert) assertThat(actual.getResources()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "resources"));
}
/**
* Navigates to the property securityContext so that assertions can be done on it
*/
public SecurityContextAssert securityContext() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (SecurityContextAssert) assertThat(actual.getSecurityContext()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "securityContext"));
}
/**
* Navigates to the property startupProbe so that assertions can be done on it
*/
public ProbeAssert startupProbe() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (ProbeAssert) assertThat(actual.getStartupProbe()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "startupProbe"));
}
/**
* Navigates to the property stdin so that assertions can be done on it
*/
public org.assertj.core.api.BooleanAssert stdin() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.BooleanAssert) assertThat(actual.getStdin()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "stdin"));
}
/**
* Navigates to the property stdinOnce so that assertions can be done on it
*/
public org.assertj.core.api.BooleanAssert stdinOnce() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.BooleanAssert) assertThat(actual.getStdinOnce()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "stdinOnce"));
}
/**
* Navigates to the property terminationMessagePath so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert terminationMessagePath() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getTerminationMessagePath()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "terminationMessagePath"));
}
/**
* Navigates to the property terminationMessagePolicy so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert terminationMessagePolicy() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getTerminationMessagePolicy()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "terminationMessagePolicy"));
}
/**
* Navigates to the property tty so that assertions can be done on it
*/
public org.assertj.core.api.BooleanAssert tty() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.BooleanAssert) assertThat(actual.getTty()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "tty"));
}
/**
* Navigates to the property volumeDevices so that assertions can be done on it
*/
public NavigationListAssert volumeDevices() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public VolumeDeviceAssert createAssert(VolumeDevice t) {
return (VolumeDeviceAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getVolumeDevices(), assertFactory);
answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "volumeDevices"));
return answer;
}
/**
* Navigates to the property volumeMounts so that assertions can be done on it
*/
public NavigationListAssert volumeMounts() {
isNotNull();
// return the assertion for the property
AssertFactory assertFactory = new AssertFactory() {
public VolumeMountAssert createAssert(VolumeMount t) {
return (VolumeMountAssert) assertThat(t);
}
};
NavigationListAssert answer = new NavigationListAssert(actual.getVolumeMounts(), assertFactory);
answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "volumeMounts"));
return answer;
}
/**
* Navigates to the property workingDir so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert workingDir() {
// check that actual Container we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getWorkingDir()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "workingDir"));
}
}