@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); }
@Override public void destroy() { try { greeter.destroy(); } catch (RemoteException e) { logger.log(Level.SEVERE, "problem trying to destroy Greeter", e); } }
@Test public void shouldSayHelloWorld() { String greeting = greeter.createGreeting("Hello", "World"); assertThat(greeting, is("Hello World!")); }
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()); }