| | package com.sample; |
---|
| | |
---|
| | import org.junit.Test; |
---|
| | import junit.framework.TestCase; |
---|
| | import static junit.framework.Assert.*; |
---|
| | import static org.junit.Assert.*; |
---|
| | import static org.hamcrest.CoreMatchers.*; |
---|
| | |
---|
| | |
---|
| | /** |
---|
| | * Unit test for simple App. |
---|
| | */ |
---|
| | public class AppTest |
---|
| | extends TestCase |
---|
| | { |
---|
| | /** |
---|
| | * Create the test case |
---|
| | * |
---|
| | * @param testName name of the test case |
---|
| | * "Hello" であること。 |
---|
| | */ |
---|
| | public AppTest( String testName ) |
---|
| | @Test |
---|
| | public void case1() |
---|
| | { |
---|
| | super( testName ); |
---|
| | assertThat("Hello", is("Hello")); |
---|
| | } |
---|
| | |
---|
| | /** |
---|
| | * Rigourous Test :-) |
---|
| | * 1 であること。 |
---|
| | */ |
---|
| | @Test |
---|
| | public void testApp() |
---|
| | public void case3() |
---|
| | { |
---|
| | assertEquals("correct","Hello", "Hello"); // OK |
---|
| | //assertEquals("correct","Hello", "hello"); // NG |
---|
| | assertThat(1, is(1)); |
---|
| | } |
---|
| | } |
---|
| | |
---|
|