All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.fabric8.kubernetes.api.model.AbstractNodeStatusAssert Maven / Gradle / Ivy

Go to download

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 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(io.fabric8.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(io.fabric8.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(io.fabric8.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(io.fabric8.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(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "conditions"));
    return answer;
  }


  /**
   * Navigates to the property config so that assertions can be done on it
   */
  public NodeConfigStatusAssert config()  {
    // check that actual NodeStatus we want to make assertions on is not null.
    isNotNull();

    // return the assertion for the property
    return (NodeConfigStatusAssert) assertThat(actual.getConfig()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "config"));
  }


  /**
   * 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(io.fabric8.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(io.fabric8.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(io.fabric8.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(io.fabric8.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(io.fabric8.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(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "volumesInUse"));
    return answer;
  }


}