# Class CompilationSubject.DiagnosticInFile

java.lang.Object
com.google.testing.compile.CompilationSubject.DiagnosticInFile

Enclosing class:
  `CompilationSubject`

public final class CompilationSubject.DiagnosticInFile extends Object
Assertions that a note, warning, or error was found in a given file.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`failExpectingMatchingDiagnostic(String format, Object... args)`
`CompilationSubject.DiagnosticOnLine`
`inFile(JavaFileObject expectedFile)`
Asserts that the note, warning, or error was found in a given file.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### inFile

@CanIgnoreReturnValue public CompilationSubject.DiagnosticOnLine inFile(JavaFileObject expectedFile)
Asserts that the note, warning, or error was found in a given file.

### failExpectingMatchingDiagnostic

protected void failExpectingMatchingDiagnostic(String format, Object... args)