io.fabric8.kubernetes.api.model.AbstractServiceSpecAssert Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.Assertions;
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 ServiceSpec} specific assertions - Generated by CustomAssertionGenerator.
*/
public abstract class AbstractServiceSpecAssert, A extends ServiceSpec> extends AbstractAssert {
/**
* Creates a new {@link AbstractServiceSpecAssert}
to make assertions on actual ServiceSpec.
* @param actual the ServiceSpec we want to make assertions on.
*/
protected AbstractServiceSpecAssert(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 ServiceSpec 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 clusterIP so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert clusterIP() {
// check that actual ServiceSpec we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getClusterIP()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "clusterIP"));
}
/**
* Navigates to the property deprecatedPublicIPs so that assertions can be done on it
*/
public NavigationListAssert deprecatedPublicIPs() {
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.getDeprecatedPublicIPs(), assertFactory);
answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "deprecatedPublicIPs"));
return answer;
}
/**
* Navigates to the property externalIPs so that assertions can be done on it
*/
public NavigationListAssert externalIPs() {
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.getExternalIPs(), assertFactory);
answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "externalIPs"));
return answer;
}
/**
* Navigates to the property loadBalancerIP so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert loadBalancerIP() {
// check that actual ServiceSpec we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getLoadBalancerIP()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "loadBalancerIP"));
}
/**
* Navigates to the property portalIP so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert portalIP() {
// check that actual ServiceSpec we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getPortalIP()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "portalIP"));
}
/**
* 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 ServicePortAssert createAssert(ServicePort t) {
return (ServicePortAssert) 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 selector so that assertions can be done on it
*/
public org.assertj.core.api.MapAssert selector() {
// check that actual ServiceSpec we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.MapAssert) assertThat(actual.getSelector()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "selector"));
}
/**
* Navigates to the property sessionAffinity so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert sessionAffinity() {
// check that actual ServiceSpec we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getSessionAffinity()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "sessionAffinity"));
}
/**
* Navigates to the property type so that assertions can be done on it
*/
public org.assertj.core.api.StringAssert type() {
// check that actual ServiceSpec we want to make assertions on is not null.
isNotNull();
// return the assertion for the property
return (org.assertj.core.api.StringAssert) assertThat(actual.getType()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "type"));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy