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

io.fabric8.openshift.api.model.AbstractImageAssert Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
package io.fabric8.openshift.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 Image} specific assertions - Generated by CustomAssertionGenerator.
 */
public abstract class AbstractImageAssert, A extends Image> extends AbstractAssert {

  /**
   * Creates a new {@link AbstractImageAssert} to make assertions on actual Image.
   * @param actual the Image we want to make assertions on.
   */
  protected AbstractImageAssert(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 Image 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 apiVersion so that assertions can be done on it
   */
  public org.assertj.core.api.StringAssert apiVersion()  {
    // check that actual Image we want to make assertions on is not null.
    isNotNull();

    // return the assertion for the property
    return (org.assertj.core.api.StringAssert) assertThat(actual.getApiVersion()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "apiVersion"));
  }


  /**
   * Navigates to the property dockerImageConfig so that assertions can be done on it
   */
  public org.assertj.core.api.StringAssert dockerImageConfig()  {
    // check that actual Image we want to make assertions on is not null.
    isNotNull();

    // return the assertion for the property
    return (org.assertj.core.api.StringAssert) assertThat(actual.getDockerImageConfig()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "dockerImageConfig"));
  }


  /**
   * Navigates to the property dockerImageLayers so that assertions can be done on it
   */
  public NavigationListAssert dockerImageLayers()  {
    isNotNull();

    // return the assertion for the property
    AssertFactory assertFactory = new AssertFactory() {
      public ImageLayerAssert createAssert(ImageLayer t) {
        return (ImageLayerAssert) assertThat(t);
      }
    };
    NavigationListAssert answer = new NavigationListAssert(actual.getDockerImageLayers(), assertFactory);
    answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "dockerImageLayers"));
    return answer;
  }


  /**
   * Navigates to the property dockerImageManifest so that assertions can be done on it
   */
  public org.assertj.core.api.StringAssert dockerImageManifest()  {
    // check that actual Image we want to make assertions on is not null.
    isNotNull();

    // return the assertion for the property
    return (org.assertj.core.api.StringAssert) assertThat(actual.getDockerImageManifest()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "dockerImageManifest"));
  }


  /**
   * Navigates to the property dockerImageManifestMediaType so that assertions can be done on it
   */
  public org.assertj.core.api.StringAssert dockerImageManifestMediaType()  {
    // check that actual Image we want to make assertions on is not null.
    isNotNull();

    // return the assertion for the property
    return (org.assertj.core.api.StringAssert) assertThat(actual.getDockerImageManifestMediaType()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "dockerImageManifestMediaType"));
  }


  /**
   * Navigates to the property dockerImageMetadataVersion so that assertions can be done on it
   */
  public org.assertj.core.api.StringAssert dockerImageMetadataVersion()  {
    // check that actual Image we want to make assertions on is not null.
    isNotNull();

    // return the assertion for the property
    return (org.assertj.core.api.StringAssert) assertThat(actual.getDockerImageMetadataVersion()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "dockerImageMetadataVersion"));
  }


  /**
   * Navigates to the property dockerImageReference so that assertions can be done on it
   */
  public org.assertj.core.api.StringAssert dockerImageReference()  {
    // check that actual Image we want to make assertions on is not null.
    isNotNull();

    // return the assertion for the property
    return (org.assertj.core.api.StringAssert) assertThat(actual.getDockerImageReference()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "dockerImageReference"));
  }


  /**
   * Navigates to the property dockerImageSignatures so that assertions can be done on it
   */
  public NavigationListAssert dockerImageSignatures()  {
    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.getDockerImageSignatures(), assertFactory);
    answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "dockerImageSignatures"));
    return answer;
  }


  /**
   * Navigates to the property kind so that assertions can be done on it
   */
  public org.assertj.core.api.StringAssert kind()  {
    // check that actual Image we want to make assertions on is not null.
    isNotNull();

    // return the assertion for the property
    return (org.assertj.core.api.StringAssert) assertThat(actual.getKind()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "kind"));
  }


  /**
   * Navigates to the property metadata so that assertions can be done on it
   */
  public io.fabric8.kubernetes.api.model.ObjectMetaAssert metadata()  {
    // check that actual Image we want to make assertions on is not null.
    isNotNull();

    // return the assertion for the property
    return (io.fabric8.kubernetes.api.model.ObjectMetaAssert) assertThat(actual.getMetadata()).describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "metadata"));
  }


  /**
   * Navigates to the property signatures so that assertions can be done on it
   */
  public NavigationListAssert signatures()  {
    isNotNull();

    // return the assertion for the property
    AssertFactory assertFactory = new AssertFactory() {
      public ImageSignatureAssert createAssert(ImageSignature t) {
        return (ImageSignatureAssert) assertThat(t);
      }
    };
    NavigationListAssert answer = new NavigationListAssert(actual.getSignatures(), assertFactory);
    answer.describedAs(io.fabric8.kubernetes.assertions.Assertions.joinDescription(this, "signatures"));
    return answer;
  }


}