GitBucket
4.23.0
Toggle navigation
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
sample-java
/
sample-junit1
Browse code
JUnit4の書き方に修正。
master
1 parent
d0b9b59
commit
74b0f54b1b548b3fe30b8f4fb69d8eb12aa30a50
yhornisse
authored
on 28 Dec 2019
Patch
Showing
1 changed file
src/test/java/com/sample/AppTest.java
Ignore Space
Show notes
View
src/test/java/com/sample/AppTest.java
package com.sample; import org.junit.Test; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.*; /** * Unit test for simple App. */ public class AppTest { /** * "Hello" であること。 */ @Test public void case1() { assertThat("Hello", is("Hello")); } /** * 1 であること。 */ @Test public void case3() { assertThat(1, is(1)); } }
package com.sample; import org.junit.Test; import junit.framework.TestCase; import static junit.framework.Assert.*; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * Rigourous Test :-) */ @Test public void testApp() { assertEquals("correct","Hello", "Hello"); // OK //assertEquals("correct","Hello", "hello"); // NG } }
Show line notes below