Skip to content

Commit

Permalink
report analzers messages when they fail
Browse files Browse the repository at this point in the history
  • Loading branch information
aharon hacmon committed Jan 27, 2014
1 parent 7ab61fb commit fbb0db0
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package il.co.topq.integframework.cli.conn;

import il.co.topq.integframework.AbstractModuleImpl;
import il.co.topq.integframework.assertion.AbstractAssertionLogic;
import il.co.topq.integframework.assertion.IAssertionLogic;
import il.co.topq.integframework.cli.terminal.BufferInputStream;
import il.co.topq.integframework.cli.terminal.Cli;
Expand Down Expand Up @@ -397,7 +398,13 @@ public static void handleCliCommand(CliConnectionImpl cli, String title, CliComm
if (analyzers != null) {
for (IAssertionLogic<String> analyzer : analyzers) {
analyzer.setActual(cli.getActual(String.class));
analyzer.doAssertion();
analyzer.doAssertion();
if (analyzer instanceof AbstractAssertionLogic<?> ){
AbstractAssertionLogic<String> stringAssertionLogic = (AbstractAssertionLogic<String>) analyzer;
if (!(command.isSilent() && stringAssertionLogic.isStatus())){
Reporter.log(stringAssertionLogic.getTitle(), stringAssertionLogic.getMessage(), stringAssertionLogic.isStatus());
}
}
}
}
}
Expand Down

0 comments on commit fbb0db0

Please sign in to comment.