Class GroovyDslGradleBuildAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
org.assertj.core.api.AbstractCharSequenceAssert<SELF,String>
org.assertj.core.api.AbstractStringAssert<SELF>
io.spring.initializr.generator.test.io.AbstractTextAssert<GroovyDslGradleBuildAssert>
io.spring.initializr.generator.test.buildsystem.gradle.GroovyDslGradleBuildAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<GroovyDslGradleBuildAssert,String>, org.assertj.core.api.Descriptable<GroovyDslGradleBuildAssert>, org.assertj.core.api.EnumerableAssert<GroovyDslGradleBuildAssert,Character>, org.assertj.core.api.ExtensionPoints<GroovyDslGradleBuildAssert,String>

public class GroovyDslGradleBuildAssert extends AbstractTextAssert<GroovyDslGradleBuildAssert>
Simple assertions for a gradle build using the Groovy DSL.
Author:
Stephane Nicoll
  • Field Summary

    Fields inherited from class org.assertj.core.api.AbstractAssert

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Assert build.gradle contains only the specified properties.
    Assert build.gradle defines a plugin with the specified id.
    hasPlugin(String id, String version)
    Assert build.gradle defines a plugin with the specified id and version.
    hasProperty(String name, String value)
    Assert build.gradle defines a top-level property with the specified name and value.
    Assert build.gradle uses a source compatibility for the specified java version.
    hasVersion(String version)
    Assert build.gradle uses the specified version.

    Methods inherited from class io.spring.initializr.generator.test.io.AbstractTextAssert

    containsExactly, hasSameContentAs, lines

    Methods inherited from class org.assertj.core.api.AbstractStringAssert

    asBase64Decoded, decodedAsBase64, isBase64, isBetween, isEqualTo, isEqualTo, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isStrictlyBetween, usingComparator, usingComparator, usingDefaultComparator

    Methods inherited from class org.assertj.core.api.AbstractCharSequenceAssert

    contains, contains, containsAnyOf, containsIgnoringCase, containsIgnoringNewLines, containsIgnoringWhitespaces, containsOnlyDigits, containsOnlyOnce, containsOnlyWhitespaces, containsPattern, containsPattern, containsSequence, containsSequence, containsSubsequence, containsSubsequence, containsWhitespaces, doesNotContain, doesNotContain, doesNotContainAnyWhitespaces, doesNotContainIgnoringCase, doesNotContainOnlyWhitespaces, doesNotContainPattern, doesNotContainPattern, doesNotEndWith, doesNotEndWithIgnoringCase, doesNotMatch, doesNotMatch, doesNotStartWith, doesNotStartWithIgnoringCase, endsWith, endsWithIgnoringCase, hasLineCount, hasSameSizeAs, hasSameSizeAs, hasSameSizeAs, hasSize, hasSizeBetween, hasSizeGreaterThan, hasSizeGreaterThanOrEqualTo, hasSizeLessThan, hasSizeLessThanOrEqualTo, inHexadecimal, inUnicode, isBlank, isEmpty, isEqualToIgnoringCase, isEqualToIgnoringNewLines, isEqualToIgnoringWhitespace, isEqualToNormalizingNewlines, isEqualToNormalizingPunctuationAndWhitespace, isEqualToNormalizingUnicode, isEqualToNormalizingWhitespace, isJavaBlank, isLowerCase, isMixedCase, isNotBlank, isNotEmpty, isNotEqualToIgnoringCase, isNotEqualToIgnoringWhitespace, isNotEqualToNormalizingWhitespace, isNotJavaBlank, isNullOrEmpty, isSubstringOf, isUpperCase, isXmlEqualTo, isXmlEqualToContentOf, matches, matches, startsWith, startsWithIgnoringCase, usingDefaultElementComparator, usingElementComparator

    Methods inherited from class org.assertj.core.api.AbstractAssert

    areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, as, as, describedAs
  • Constructor Details

    • GroovyDslGradleBuildAssert

      public GroovyDslGradleBuildAssert(String content)
    • GroovyDslGradleBuildAssert

      public GroovyDslGradleBuildAssert(Path buildGradleFile)
  • Method Details

    • hasPlugin

      public GroovyDslGradleBuildAssert hasPlugin(String id, String version)
      Assert build.gradle defines a plugin with the specified id and version.
      Parameters:
      id - the id of the plugin
      version - the version of the plugin
      Returns:
      this assertion object
    • hasPlugin

      public GroovyDslGradleBuildAssert hasPlugin(String id)
      Assert build.gradle defines a plugin with the specified id.
      Parameters:
      id - the id of the plugin
      Returns:
      this assertion object
    • hasVersion

      public GroovyDslGradleBuildAssert hasVersion(String version)
      Assert build.gradle uses the specified version.
      Parameters:
      version - the version of the build
      Returns:
      this assertion object
    • hasSourceCompatibility

      public GroovyDslGradleBuildAssert hasSourceCompatibility(String javaVersion)
      Assert build.gradle uses a source compatibility for the specified java version.
      Parameters:
      javaVersion - the java version
      Returns:
      this assertion object
    • hasProperty

      public GroovyDslGradleBuildAssert hasProperty(String name, String value)
      Assert build.gradle defines a top-level property with the specified name and value.
      Parameters:
      name - the name of the property
      value - the value
      Returns:
      this assertion object
    • containsOnlyExtProperties

      public GroovyDslGradleBuildAssert containsOnlyExtProperties(String... values)
      Assert build.gradle contains only the specified properties.
      Parameters:
      values - the property value pairs
      Returns:
      this for method chaining.