@Test
  public void testGreetLocated() throws Exception {
    String who = "World";
    String expected = "Hi " + who + " from SDLCTestingTraining";
    String actual = greeter.greetLocated(who);

    assertEquals(expected, actual);
  }
  @Test
  public void testGreet() throws Exception {
    String who = "World";
    String expected = "Hi " + who;
    String actual = greeter.greet(who);

    assertEquals(expected, actual);
  }
コード例 #3
0
 @Override
 public void destroy() {
   try {
     greeter.destroy();
   } catch (RemoteException e) {
     logger.log(Level.SEVERE, "problem trying to destroy Greeter", e);
   }
 }
コード例 #4
0
 @Test
 public void shouldSayHelloWorld() {
   String greeting = greeter.createGreeting("Hello", "World");
   assertThat(greeting, is("Hello World!"));
 }
コード例 #5
0
ファイル: HelloWorld.java プロジェクト: bhochhi/howto-guide
 public static void main11(String[] args) {
   LocalTime currentTime = new LocalTime();
   System.out.println("The current local time is: " + currentTime);
   Greeter greeter = new Greeter();
   System.out.println(greeter.sayHello());
 }