try{
// the invoke will throw an exception, if the test is performed right
float total = proxy.getQuote("DF1");
fail( "Expected DerivedFault1_Exception but no fault was thrown");
}catch(DerivedFault1_Exception e){
DerivedFault1_Exception fault = (DerivedFault1_Exception) e;
DerivedFault1 faultInfo = fault.getFaultInfo();
assertNotNull(faultInfo);
assertEquals(100, faultInfo.getA());
assertEquals("DF1", faultInfo.getB());
} catch (Exception e) {
fail("Wrong exception thrown. Expected DerivedFault1_Exception but received " + e.getClass());
}
// Repeat to verify behavior
try{
// the invoke will throw an exception, if the test is performed right
float total = proxy.getQuote("DF1");
fail( "Expected DerivedFault1_Exception but no fault was thrown");
}catch(DerivedFault1_Exception e){
DerivedFault1_Exception fault = (DerivedFault1_Exception) e;
DerivedFault1 faultInfo = fault.getFaultInfo();
assertNotNull(faultInfo);
assertEquals(100, faultInfo.getA());
assertEquals("DF1", faultInfo.getB());
} catch (Exception e) {
fail("Wrong exception thrown. Expected DerivedFault1_Exception but received " + e.getClass());