public void testAssertionVerified(Assertion assertion, TestResult testResult) {
if (testResult == null) {
return;
}
Instruction instruction = assertion.getInstruction();
Expectation expectation = assertion.getExpectation();
TestExecutionReport.InstructionResult instructionResult = new TestExecutionReport.InstructionResult();
instructionResults.add(instructionResult);
String id = instruction.getId();
instructionResult.instruction = instruction.toString();
instructionResult.slimResult = testResult.toString();
try {
TestExecutionReport.Expectation expectationResult = new TestExecutionReport.Expectation();
instructionResult.addExpectation(expectationResult);
expectationResult.instructionId = id;
expectationResult.type = expectation.getClass().getSimpleName();
expectationResult.actual = testResult.getActual();
expectationResult.expected = testResult.getExpected();
expectationResult.evaluationMessage = testResult.getMessage();
if (testResult.getExecutionResult() != null) {
expectationResult.status = testResult.getExecutionResult().toString();