Package calculator.dosgi

Examples of calculator.dosgi.CalculatorService.divide()


            Assert.assertNotNull(service);
            CalculatorService calculator = OSGiTestBundles.cast(service, CalculatorService.class);
            System.out.println("2.0 + 1.0 = " + calculator.add(2.0, 1.0));
            System.out.println("2.0 - 1.0 = " + calculator.subtract(2.0, 1.0));
            System.out.println("2.0 * 1.0 = " + calculator.multiply(2.0, 1.0));
            System.out.println("2.0 / 1.0 = " + calculator.divide(2.0, 1.0));
        }
    }

    /**
     * @throws java.lang.Exception
View Full Code Here


        Assert.assertNotNull(service);
        CalculatorService calculator = OSGiTestUtils.cast(service, CalculatorService.class);
        System.out.println("2.0 + 1.0 = " + calculator.add(2.0, 1.0));
        System.out.println("2.0 - 1.0 = " + calculator.subtract(2.0, 1.0));
        System.out.println("2.0 * 1.0 = " + calculator.multiply(2.0, 1.0));
        System.out.println("2.0 / 1.0 = " + calculator.divide(2.0, 1.0));
    }

    @Test
    /**
     * Test the Web service exposed by the Calculator
View Full Code Here

                calculatorBundle.getBundleContext().getServiceReferences(CalculatorService.class.getName(), filter)[0];
            CalculatorService calculator = OSGiTestBundles.cast(context.getService(ref), CalculatorService.class);
            System.out.println("2.0 + 1.0 = " + calculator.add(2.0, 1.0));
            System.out.println("2.0 - 1.0 = " + calculator.subtract(2.0, 1.0));
            System.out.println("2.0 * 1.0 = " + calculator.multiply(2.0, 1.0));
            System.out.println("2.0 / 1.0 = " + calculator.divide(2.0, 1.0));
        } catch (Exception e) {
            e.printStackTrace();
            throw e;
        }
    }
View Full Code Here

            Assert.assertNotNull(service);
            CalculatorService calculator = OSGiTestBundles.cast(service, CalculatorService.class);
            System.out.println("2.0 + 1.0 = " + calculator.add(2.0, 1.0));
            System.out.println("2.0 - 1.0 = " + calculator.subtract(2.0, 1.0));
            System.out.println("2.0 * 1.0 = " + calculator.multiply(2.0, 1.0));
            System.out.println("2.0 / 1.0 = " + calculator.divide(2.0, 1.0));
        }
    }

    /**
     * @throws java.lang.Exception
View Full Code Here

        Assert.assertNotNull(service);
        CalculatorService calculator = OSGiTestUtils.cast(service, CalculatorService.class);
        System.out.println("2.0 + 1.0 = " + calculator.add(2.0, 1.0));
        System.out.println("2.0 - 1.0 = " + calculator.subtract(2.0, 1.0));
        System.out.println("2.0 * 1.0 = " + calculator.multiply(2.0, 1.0));
        System.out.println("2.0 / 1.0 = " + calculator.divide(2.0, 1.0));
    }

    @Test
    /**
     * Test the Web service exposed by the Calculator
View Full Code Here

        Assert.assertNotNull(service);
        CalculatorService calculator = OSGiTestUtils.cast(service, CalculatorService.class);
        System.out.println("2.0 + 1.0 = " + calculator.add(2.0, 1.0));
        System.out.println("2.0 - 1.0 = " + calculator.subtract(2.0, 1.0));
        System.out.println("2.0 * 1.0 = " + calculator.multiply(2.0, 1.0));
        System.out.println("2.0 / 1.0 = " + calculator.divide(2.0, 1.0));
    }

    @Test
    /**
     * Test the Web service exposed by the Calculator
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.