Package org.springframework.integration.samples.storedprocedure.service

Examples of org.springframework.integration.samples.storedprocedure.service.StringConversionService


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

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

    final String stringToConvert = "I love Spring Integration";
    final String expectedResult  = "I LOVE SPRING INTEGRATION";

    final String convertedString = service.convertToUpperCase(stringToConvert);

    Assert.assertEquals("Expecting that the string is converted to upper case.",
        expectedResult, convertedString);

  }
View Full Code Here


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

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

        final String stringToConvert = "I love Spring Integration";
        final String expectedResult  = "I LOVE SPRING INTEGRATION";

      //  final String convertedString = service.convertToUpperCase(stringToConvert);
View Full Code Here

    context.registerShutdownHook();

    final Scanner scanner = new Scanner(System.in);

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

    LOGGER.info("\n========================================================="
          + "\n                                                         "
          + "\n    Please press 'q + Enter' to quit the application.    "
          + "\n                                                         "
          + "\n=========================================================" );

    System.out.print("Please enter a string and press <enter>: ");

    while (!scanner.hasNext("q")) {
      String input = scanner.nextLine();

      System.out.println("Converting String to Uppcase using Stored Procedure...");
      String inputUpperCase = service.convertToUpperCase(input);

      System.out.println("Retrieving Numeric value via Sql Function...");
      Integer number = service.getNumber();

      System.out.println(String.format("Converted '%s' - End Result: '%s_%s'.", input, inputUpperCase, number));
      System.out.print("To try again, please enter a string and press <enter>:");
    }
View Full Code Here

    final GenericXmlApplicationContext context = new GenericXmlApplicationContext();
    context.load("classpath:META-INF/spring/integration/spring-integration-sample1-context.xml");
    context.registerShutdownHook();
    context.refresh();

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

    final String message =
          "\n========================================================="
        + "\n                                                         "
        + "\n    Please press 'q + Enter' to quit the application.    "
        + "\n                                                         "
        + "\n========================================================="
        + "\n\n Please enter a string and press <enter>: ";

    System.out.print(message);

    while (!scanner.hasNext("q")) {
      String input = scanner.nextLine();

      System.out.println("Converting String to Uppcase using Stored Procedure...");
      String inputUpperCase = service.convertToUpperCase(input);

      System.out.println("Retrieving Numeric value via Sql Function...");
      Integer number = service.getNumber();

      System.out.println(String.format("Converted '%s' - End Result: '%s_%s'.", input, inputUpperCase, number));
      System.out.print("To try again, please enter a string and press <enter>:");
    }
View Full Code Here

TOP

Related Classes of org.springframework.integration.samples.storedprocedure.service.StringConversionService

Copyright © 2018 www.massapicom. 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.