001package org.hl7.fhir.utilities.tests.execution.junit4; 002 003import org.hl7.fhir.utilities.tests.execution.CliTestException; 004import org.junit.runner.notification.Failure; 005 006public class JUnit4TestException implements CliTestException { 007 008 private final Failure failure; 009 010 public JUnit4TestException(Failure failure) { 011 this.failure = failure; 012 } 013 @Override 014 public String getTestId() { 015 return failure.getDescription().getClassName() + failure.getDescription().getMethodName() + failure.getDescription().getDisplayName(); 016 } 017 018 @Override 019 public Throwable getException() { 020 return failure.getException(); 021 } 022}