Examples of CustomerService


Examples of org.springframework.integration.service.CustomerService

  public void testExtractCustomerNames() {
    final ApplicationContext context
      = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
                        CustomerServiceTest.class);

    final CustomerService service = context.getBean(CustomerService.class);

    final String sourceXml = "<customers><customer id=\"1\"><name>Foo Industries</name>"
        + "<industry>Chemical</industry><city>Glowing City</city></customer></customers>";
    final String expectedResult  = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
      + "<customers>\n"
      + "   <name>Foo Industries</name>\n"
      + "</customers>\n";

    final String extractedCustomerNames = service.getCustomerNames(sourceXml);

    System.out.println(">>" + expectedResult + "<<");
    System.out.println(">>" + extractedCustomerNames + "<<");

    Assert.assertEquals("The expected list of customer names did not match.",
View Full Code Here

Examples of org.springframework.integration.service.CustomerService

    context.load("classpath:META-INF/spring/integration/*-context.xml");
    context.registerShutdownHook();
    context.refresh();

    final CustomerService service = context.getBean(CustomerService.class);

    final Resource resource = context.getResource("classpath:data/customers.xml");
    final InputStream is = resource.getInputStream();
    final String customers = new String(FileCopyUtils.copyToByteArray(is));

    System.out.println("\n\nExtracting Customer Names from:\n"
                     + HORIZONTAL_LINE
                     + customers + "\n"
                     + HORIZONTAL_LINE
                     + "\n");
    final String customernames = service.getCustomerNames(customers);
    System.out.println("Extracted Customer Names: \n"
                     + HORIZONTAL_LINE
                     + customernames + "\n"
                     + HORIZONTAL_LINE
                     + "\n");
View Full Code Here

Examples of test.CustomerService

    GroovyShell shell = new GroovyShell(binding);
    Script script = shell.parse("service.with{sru()} ;x = 123; return foo * 10;");
    MetaClass metaClass = script.getMetaClass();
    Binding binding2 = script.getBinding();
    // Object property = script.getProperty("service");
    script.setProperty("service", new CustomerService() {

      @Override
      public void sru() {
        System.out.println("sruuu");

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.