Examples of BaseFault


Examples of org.test.polymorphicfaults.BaseFault

        TestLogger.logger.debug("----------------------------------");
       
        assertNotNull(exception);
        Object fault = ((BaseFault_Exception)exception).getFaultInfo();
        assertTrue(fault.getClass() == BaseFault.class);
        BaseFault bf = (BaseFault) fault;
        assertTrue(bf.getA() == 2);
       
    }
View Full Code Here

Examples of org.test.polymorphicfaults.BaseFault

            float total = proxy.getQuote("BASE");
            fail( "Expected BaseFault_Exception but no fault was thrown ");
        }catch(BaseFault_Exception e){
            BaseFault_Exception fault = (BaseFault_Exception) e;

            BaseFault faultInfo = fault.getFaultInfo();
            assertTrue(faultInfo != null);
            assertTrue(faultInfo.getA() == 400);
        } catch (Exception e) {
            fail("Wrong exception thrown.  Expected BaseFault_Exception but received " + e.getClass());
        }
    }
View Full Code Here

Examples of org.test.polymorphicfaults.BaseFault

            df.setA(200);
            df.setB(tickerSymbol);
            df.setC(80.0F);
            throw new DerivedFault2_Exception("Server throws DerivedFault2_Exception", df);
        } else if (tickerSymbol.equals("BASE")) {
            BaseFault bf = new BaseFault();
            bf.setA(400);
            throw new BaseFault_Exception("Server throws BaseFault_Exception", bf);
        } else if (tickerSymbol.equals("INJECTION")) {
           if (ctx != null && init) {
               // Only return this value if the context is injected and
               // the initialization method is invoked
View Full Code Here

Examples of org.test.polymorphicfaults.BaseFault

            cf.setB(b);
            cf.setC(c);
            cf.setD(5);
            throw new ComplexFault_Exception("Server throws ComplexFault_Exception", cf);
        } else if (b.equals("BaseFault")) {
            BaseFault bf = new BaseFault();
            bf.setA(a)
            throw new BaseFault_Exception("Server throws BaseFault_Exception", bf);
        } else if (b.equals("DerivedFault1")) {
            DerivedFault1 df = new DerivedFault1();
            df.setA(a);
            df.setB(b);
View Full Code Here

Examples of org.test.polymorphicfaults.BaseFault

        TestLogger.logger.debug("----------------------------------");
       
        assertNotNull(exception);
        Object fault = ((BaseFault_Exception)exception).getFaultInfo();
        assertTrue(fault.getClass() == BaseFault.class);
        BaseFault bf = (BaseFault) fault;
        assertTrue(bf.getA() == 2);
       
    }
View Full Code Here

Examples of org.test.polymorphicfaults.BaseFault

            float total = proxy.getQuote("BASE");
            fail( "Expected BaseFault_Exception but no fault was thrown ");
        }catch(BaseFault_Exception e){
            BaseFault_Exception fault = (BaseFault_Exception) e;

            BaseFault faultInfo = fault.getFaultInfo();
            assertTrue(faultInfo != null);
            assertTrue(faultInfo.getA() == 400);
        } catch (Exception e) {
            fail("Wrong exception thrown.  Expected BaseFault_Exception but received " + e.getClass());
        }
    }
View Full Code Here

Examples of org.test.polymorphicfaults.BaseFault

        TestLogger.logger.debug("----------------------------------");
       
        assertNotNull(exception);
        Object fault = ((BaseFault_Exception)exception).getFaultInfo();
        assertTrue(fault.getClass() == BaseFault.class);
        BaseFault bf = (BaseFault) fault;
        assertTrue(bf.getA() == 2);
       
        // Repeat to verify
        try{
            exception = null;
            // the invoke will throw an exception, if the test is performed right
            int total = proxy.throwFault(2, "BaseFault", 2);
           
        }catch(BaseFault_Exception e){
            exception = e;
        } catch (ComplexFault_Exception e) {
            fail("Should not get ComplexFault_Exception in this testcase");
        }

        TestLogger.logger.debug("----------------------------------");
       
        assertNotNull(exception);
        fault = ((BaseFault_Exception)exception).getFaultInfo();
        assertTrue(fault.getClass() == BaseFault.class);
        bf = (BaseFault) fault;
        assertTrue(bf.getA() == 2);
       
    }
View Full Code Here

Examples of org.test.polymorphicfaults.BaseFault

            float total = proxy.getQuote("BASE");
            fail( "Expected BaseFault_Exception but no fault was thrown ");
        }catch(BaseFault_Exception e){
            BaseFault_Exception fault = (BaseFault_Exception) e;

            BaseFault faultInfo = fault.getFaultInfo();
            assertTrue(faultInfo != null);
            assertTrue(faultInfo.getA() == 400);
        } catch (Exception e) {
            fail("Wrong exception thrown.  Expected BaseFault_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("BASE");
            fail( "Expected BaseFault_Exception but no fault was thrown ");
        }catch(BaseFault_Exception e){
            BaseFault_Exception fault = (BaseFault_Exception) e;

            BaseFault faultInfo = fault.getFaultInfo();
            assertTrue(faultInfo != null);
            assertTrue(faultInfo.getA() == 400);
        } catch (Exception e) {
            fail("Wrong exception thrown.  Expected BaseFault_Exception but received " + e.getClass());
        }
    }
View Full Code Here

Examples of org.test.polymorphicfaults.BaseFault

            df.setA(200);
            df.setB(tickerSymbol);
            df.setC(80.0F);
            throw new DerivedFault2_Exception("Server throws DerivedFault2_Exception", df);
        } else if (tickerSymbol.equals("BASE")) {
            BaseFault bf = new BaseFault();
            bf.setA(400);
            throw new BaseFault_Exception("Server throws BaseFault_Exception", bf);
        } else if (tickerSymbol.equals("INJECTION")) {
           if (ctx != null && init) {
               // Only return this value if the context is injected and
               // the initialization method is invoked
View Full Code Here

Examples of org.test.polymorphicfaults.BaseFault

            cf.setB(b);
            cf.setC(c);
            cf.setD(5);
            throw new ComplexFault_Exception("Server throws ComplexFault_Exception", cf);
        } else if (b.equals("BaseFault")) {
            BaseFault bf = new BaseFault();
            bf.setA(a)
            throw new BaseFault_Exception("Server throws BaseFault_Exception", bf);
        } else if (b.equals("DerivedFault1")) {
            DerivedFault1 df = new DerivedFault1();
            df.setA(a);
            df.setB(b);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.