File tree Expand file tree Collapse file tree 5 files changed +57
-2
lines changed
src/test/java/next/reflection Expand file tree Collapse file tree 5 files changed +57
-2
lines changed Original file line number Diff line number Diff line change 1+ package next .reflection ;
2+
3+ import org .junit .jupiter .api .Test ;
4+
5+ public class Junit3Runner {
6+ @ Test
7+ public void runner () throws Exception {
8+ Class clazz = Junit3Test .class ;
9+
10+ }
11+ }
Original file line number Diff line number Diff line change 1+ package next .reflection ;
2+
3+ public class Junit3Test {
4+ public void test1 () {
5+ System .out .println ("Running Test1" );
6+ }
7+
8+ public void test2 () {
9+ System .out .println ("Running Test2" );
10+ }
11+
12+ public void three () {
13+ System .out .println ("Running Test3" );
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ package next .reflection ;
2+
3+ import org .junit .jupiter .api .Test ;
4+
5+ public class Junit4Runner {
6+ @ Test
7+ public void run () throws Exception {
8+ Class clazz = Junit4Test .class ;
9+
10+ }
11+ }
12+
13+
Original file line number Diff line number Diff line change 1+ package next .reflection ;
2+
3+ public class Junit4Test {
4+ @ MyTest
5+ public void one () throws Exception {
6+ System .out .println ("Running Test1" );
7+ }
8+
9+ @ MyTest
10+ public void two () throws Exception {
11+ System .out .println ("Running Test2" );
12+ }
13+
14+ public void testThree () throws Exception {
15+ System .out .println ("Running Test3" );
16+ }
17+ }
Original file line number Diff line number Diff line change @@ -13,15 +13,14 @@ public class ReflectionTest {
1313 private static final Logger logger = LoggerFactory .getLogger (ReflectionTest .class );
1414
1515 @ Test
16- @ DisplayName ("리플렉션을 이용해서 클래스와 메소드의 정보를 정확하게 출력해야 한다." )
16+ @ DisplayName ("테스트1: 리플렉션을 이용해서 클래스와 메소드의 정보를 정확하게 출력해야 한다." )
1717 public void showClass () {
1818 SoftAssertions s = new SoftAssertions ();
1919 Class <Question > clazz = Question .class ;
2020 logger .debug ("Classs Name {}" , clazz .getName ());
2121 }
2222
2323 @ Test
24- @ SuppressWarnings ("rawtypes" )
2524 public void constructor () throws Exception {
2625 Class <Question > clazz = Question .class ;
2726 Constructor [] constructors = clazz .getConstructors ();
You can’t perform that action at this time.
0 commit comments