Skip to content

Commit

Permalink
chap05 : JUnit 5 기초 #52
Browse files Browse the repository at this point in the history
  • Loading branch information
sangminee committed Feb 6, 2023
1 parent d03e074 commit f374962
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
32 changes: 32 additions & 0 deletions 이상민/src/test/java/chap05/LifecycleTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package chap05;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class LifecycleTest {
public LifecycleTest(){
System.out.println("new LifecycleTest");
}

@BeforeEach
void setUp(){
System.out.println("setUp");
}

@Test
void a(){
System.out.println("A");
}

@Test
void b(){
System.out.println("B");
}

@AfterEach
void tearDown(){
System.out.println("tearDown");
}

}
14 changes: 14 additions & 0 deletions 이상민/src/test/java/chap05/SumTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package chap05;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class SumTest {

@Test
void sum(){
int result = 2 + 3;
assertEquals(5, result);
}
}

0 comments on commit f374962

Please sign in to comment.