| 1234567891011121314151617181920212223 |
- import org.junit.Test;
-
- import static org.junit.Assert.assertEquals;
-
- public class HelloWorldTest {
-
- @Test
- public void helloNoName() {
- assertEquals("Hello, World!", HelloWorld.hello(""));
- assertEquals("Hello, World!", HelloWorld.hello(null));
- }
-
- @Test
- public void helloSampleName() {
- assertEquals("Hello, Alice!", HelloWorld.hello("Alice"));
- }
-
- @Test
- public void helloAnotherSampleName() throws Exception {
- assertEquals("Hello, Bob!", HelloWorld.hello("Bob"));
- }
- }
|