JUnit4の書き方に修正。
1 parent d0b9b59 commit 74b0f54b1b548b3fe30b8f4fb69d8eb12aa30a50
yhornisse authored on 28 Dec 2019
Showing 1 changed file
View
27
src/test/java/com/sample/AppTest.java
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));
}
}