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
パラメータ化テストを微修正。
master
1 parent
535a762
commit
417be4ddb8c566bf403619c6a32b0ac7565c7524
yhornisse
authored
on 29 Dec 2019
Patch
Showing
2 changed files
src/main/java/com/sample/App3.java
src/test/java/com/sample/App3Test.java
Ignore Space
Show notes
View
src/main/java/com/sample/App3.java
package com.sample; public class App3 { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
package com.sample; /** * Hello world! * */ public class App3 { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
Ignore Space
Show notes
View
src/test/java/com/sample/App3Test.java
package com.sample; import org.junit.experimental.runners.Enclosed; import org.junit.experimental.theories.Theories; import org.junit.experimental.theories.Theory; import org.junit.runner.RunWith; import org.junit.experimental.theories.DataPoint; @RunWith(Theories.class) public class App3Test { @DataPoint public static int v1 = 1; @DataPoint public static int v2 = 2; @DataPoint public static int v3 = 3; @Theory public void case1(int v) { System.out.println("case1: " + v); } @Theory public void case2(int v) { System.out.println("case2: " + v); } }
package com.sample; import org.junit.experimental.runners.Enclosed; import org.junit.experimental.theories.Theories; import org.junit.experimental.theories.Theory; import org.junit.runner.RunWith; import org.junit.experimental.theories.DataPoint; @RunWith(Theories.class) public class App3Test { @DataPoint public static String v1 = "hoge"; @DataPoint public static String v2 = "fuga"; @DataPoint public static String v3 = "piyo"; @Theory public void case1(String v) { System.out.println("case1: " + v); } @Theory public void case2(String v) { System.out.println("case2: " + v); } }
Show line notes below