Class JctCompilationAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<JctCompilationAssert,JctCompilation>
io.github.ascopes.jct.assertions.JctCompilationAssert
All Implemented Interfaces:
Assert<JctCompilationAssert,JctCompilation>, Descriptable<JctCompilationAssert>, ExtensionPoints<JctCompilationAssert,JctCompilation>

@API(since="0.0.1", status=STABLE) public final class JctCompilationAssert extends AbstractAssert<JctCompilationAssert,JctCompilation>
Assertions that apply to a JctCompilation.
Since:
0.0.1
Author:
Ashley Scopes
  • Constructor Details

  • Method Details

    • arguments

      public AbstractListAssert<?,List<? extends String>,String,? extends AbstractStringAssert<?>> arguments()
      Assert that the arguments passed to the compiler were the expected values.
      Returns:
      a list assertion object to perform assertions on the arguments with.
      Throws:
      AssertionError - if the compilation was null.
    • isSuccessful

      Assert that the compilation was successful.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the compilation was null, or if the compilation was not successful.
    • isSuccessfulWithoutWarnings

      Assert that the compilation was successful and had no warnings.

      If warnings were treated as errors by the compiler, then this is identical to calling isSuccessful().

      Returns:
      this assertion object.
      Throws:
      AssertionError - if the compilation was null, if the compilation was not successful, or if the compilation was successful but had one or more warning diagnostics.
    • isFailure

      Assert that the compilation was a failure.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the compilation was null, or if the compilation succeeded.
    • diagnostics

      Get assertions for diagnostics.
      Returns:
      assertions for the diagnostics.
      Throws:
      AssertionError - if the compilation was null.
    • packageGroup

      Perform assertions on the given package group, if it has been configured.

      If not configured, this will return assertions on a null value instead.

      Parameters:
      location - the location to configure.
      Returns:
      the assertions to perform.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
      IllegalArgumentException - if the location was module-oriented or an output location.
      NullPointerException - if the provided location object is null.
    • moduleGroup

      Perform assertions on the given module group, if it has been configured.

      If not configured, the value being asserted on will be null in value.

      Parameters:
      location - the location to configure.
      Returns:
      the assertions to perform.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
      IllegalArgumentException - if the location is not module-oriented.
      NullPointerException - if the provided location object is null.
    • outputGroup

      Perform assertions on the given output group, if it has been configured.

      If not configured, the value being asserted on will be null in value.

      Parameters:
      location - the location to configure.
      Returns:
      the assertions to perform.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
      IllegalArgumentException - if the location is not an output location.
      NullPointerException - if the provided location object is null.
    • classOutput

      Deprecated, for removal: This API element is subject to removal in a future version.
      Get assertions on the path containing class outputs, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the class outputs.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • classOutputPackages

      @API(since="0.6.4", status=STABLE) public PackageContainerGroupAssert classOutputPackages()
      Get assertions on the path containing class package outputs, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the class package outputs.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • classOutputModules

      @API(since="0.6.4", status=STABLE) public ModuleContainerGroupAssert classOutputModules()
      Get assertions on the path containing class module outputs, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the class module outputs.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • sourceOutput

      Deprecated, for removal: This API element is subject to removal in a future version.
      Get assertions on the path containing generated source outputs, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the source outputs.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • sourceOutputPackages

      @API(since="0.6.4", status=STABLE) public PackageContainerGroupAssert sourceOutputPackages()
      Get assertions on the path containing generated source package outputs, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the source package outputs.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • sourceOutputModules

      @API(since="0.6.4", status=STABLE) public ModuleContainerGroupAssert sourceOutputModules()
      Get assertions on the path containing generated source module outputs, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the source module outputs.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • generatedHeaders

      Deprecated, for removal: This API element is subject to removal in a future version.
      this method is rarely needed, so is being removed in v1.0.0. Use outputGroup(Location), passing StandardLocation.NATIVE_HEADER_OUTPUT as the first parameter instead.
      Get assertions on the path containing header outputs, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the header outputs.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • classPath

      Deprecated, for removal: This API element is subject to removal in a future version.
      use classPathPackages() instead.
      Get assertions on the path containing the class path, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the class path.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • classPathPackages

      @API(since="0.6.4", status=STABLE) public PackageContainerGroupAssert classPathPackages()
      Get assertions on the path containing the class path, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the class path.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • sourcePath

      Deprecated, for removal: This API element is subject to removal in a future version.
      Get assertions on the path containing the source path, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the source path.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • sourcePathPackages

      @API(since="0.6.4", status=STABLE) public PackageContainerGroupAssert sourcePathPackages()
      Get assertions on the path containing the source path, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the source path.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • moduleSourcePath

      Deprecated, for removal: This API element is subject to removal in a future version.
      Get assertions on the path containing the source path, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the source path.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • moduleSourcePathModules

      @API(since="0.6.4", status=STABLE) public ModuleContainerGroupAssert moduleSourcePathModules()
      Get assertions on the path containing the source path, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the source path.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • modulePath

      Deprecated, for removal: This API element is subject to removal in a future version.
      use modulePathModules() instead.
      Get assertions on the path containing the module path, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the module path.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.
    • modulePathModules

      @API(since="0.6.4", status=STABLE) public ModuleContainerGroupAssert modulePathModules()
      Get assertions on the path containing the module path, if it exists.

      If not configured, the value being asserted on will be null in value.

      Returns:
      the assertions to perform on the module path.
      Throws:
      AssertionError - if the compilation was null, or no group for the location was found.