@@ -76,7 +76,7 @@ public interface GeneratedPredicateClause {
76
76
public interface SuccessfulCompilationClause extends ChainingClause <GeneratedPredicateClause > {}
77
77
78
78
public interface UnuccessfulCompilationClause {
79
- FileClause hasError (String message );
79
+ FileClause hasErrorContaining (String message );
80
80
}
81
81
82
82
@ CheckReturnValue
@@ -111,18 +111,18 @@ public SuccessfulCompilationClause hasNoErrors() {
111
111
return new SuccessfulCompilationBuilder (result );
112
112
}
113
113
114
- public FileClause hasError (String message ) {
114
+ public FileClause hasErrorContaining (String message ) {
115
115
Compilation .Result result = Compilation .compile (processors , getSubject ());
116
- return new UnsuccessfulCompilationBuilder (result ).hasError (message );
116
+ return new UnsuccessfulCompilationBuilder (result ).hasErrorContaining (message );
117
117
}
118
118
}
119
119
120
120
public SuccessfulCompilationClause hasNoErrors () {
121
121
return new CompilationClause ().hasNoErrors ();
122
122
}
123
123
124
- public FileClause hasError (String message ) {
125
- return new CompilationClause ().hasError (message );
124
+ public FileClause hasErrorContaining (String message ) {
125
+ return new CompilationClause ().hasErrorContaining (message );
126
126
}
127
127
128
128
private final class UnsuccessfulCompilationBuilder implements UnuccessfulCompilationClause {
@@ -133,14 +133,14 @@ private final class UnsuccessfulCompilationBuilder implements UnuccessfulCompila
133
133
}
134
134
135
135
@ Override
136
- public FileClause hasError (final String message ) {
136
+ public FileClause hasErrorContaining (final String message ) {
137
137
FluentIterable <Diagnostic <? extends JavaFileObject >> diagnostics =
138
138
FluentIterable .from (result .diagnosticsByKind .get (Kind .ERROR ));
139
139
final FluentIterable <Diagnostic <? extends JavaFileObject >> diagnosticsWithMessage =
140
140
diagnostics .filter (new Predicate <Diagnostic <?>>() {
141
141
@ Override
142
142
public boolean apply (Diagnostic <?> input ) {
143
- return message . equals ( input .getMessage (null ));
143
+ return input .getMessage (null ). contains ( message );
144
144
}
145
145
});
146
146
if (diagnosticsWithMessage .isEmpty ()) {
@@ -325,8 +325,8 @@ public SuccessfulCompilationClause hasNoErrors() {
325
325
return delegate .hasNoErrors ();
326
326
}
327
327
328
- public FileClause hasError (String message ) {
329
- return delegate .hasError (message );
328
+ public FileClause hasErrorContaining (String message ) {
329
+ return delegate .hasErrorContaining (message );
330
330
}
331
331
}
332
332
}
0 commit comments