# Interface CompileTester.UnsuccessfulCompilationClause

All Superinterfaces:
  `CompileTester.CompilationWithNotesClause<CompileTester.UnsuccessfulCompilationClause>, CompileTester.CompilationWithWarningsClause<CompileTester.UnsuccessfulCompilationClause>`

Enclosing interface:
  `CompileTester`

public static interface CompileTester.UnsuccessfulCompilationClause extends CompileTester.CompilationWithWarningsClause<CompileTester.UnsuccessfulCompilationClause>
The clause in the fluent API for further tests on unsuccessful compilations.

Author:
  Gregory Kick

## Method Summary

Modifier and Type
Method
Description
`CompileTester.FileClause<CompileTester.UnsuccessfulCompilationClause>`
`withErrorContaining(String messageFragment)`
Checks that an error exists that contains the given fragment in the diagnostic message.
`CompileTester.UnsuccessfulCompilationClause`
`withErrorCount(int errorCount)`
Checks that the total error count in all files matches the given amount.

### Methods inherited from interface CompileTester.CompilationWithNotesClause

`withNoteContaining, withNoteCount`

### Methods inherited from interface CompileTester.CompilationWithWarningsClause

`withWarningContaining, withWarningCount`

## Method Details

### withErrorContaining

@CanIgnoreReturnValue CompileTester.FileClause<CompileTester.UnsuccessfulCompilationClause> withErrorContaining(String messageFragment)
Checks that an error exists that contains the given fragment in the diagnostic message.

### withErrorCount

@CanIgnoreReturnValue CompileTester.UnsuccessfulCompilationClause withErrorCount(int errorCount)
Checks that the total error count in all files matches the given amount. This only counts diagnostics of the kind `Diagnostic.Kind.ERROR` and not (for example) warnings.