JUnit 4 notes

Use annotations

Annotation meaning class
@Test Method to be tested org.junit.Test
@Test(expected=Exception class.class) Success if the specified exception occurs org.junit.Test
@Test(timeout=millisecond) Failure if the specified time is exceeded org.junit.Test
@Ignore("comment") Exclude from the test (@Attach to Test) org.junit.Ignore
@Before Previous setUp()Equivalent to org.junit.Before
@After Previous tearDown()Equivalent to org.junit.After
@BeforeClass Pre-processing performed only once before running all tests org.junit.BeforeClass
@AfterClass Post-processing performed only once after executing all tests org.junit.AfterClass

Recommended Posts

JUnit 4 notes
junit
JUnit story
java notes
JUnit memorandum
synchronized notes
Jigsaw study notes
Let's create JUnit.
[wip] Docker notes
[100%] CyclicRotation (src & jUnit)
[100%] PermMissingElem (src & jUnit)
Java Generics (Notes)
JavaFX study notes
[Android] Detailed notes
[100%] FrogJmp (src & jUnit)
db connection notes
[Java] Array notes
Ruby Hash notes
[100%] FrogRiverOne (src & jUnit)
Enum review notes
Notes on how to use each JUnit Rule
[100%] OddOccurrencesInArray (src & jUnit)
Docker study notes
DDD personal notes
[100%] MinAvgTwoSlice (src & junit)
[Java] Study notes
Graal related notes
Java serialization notes
[100%] PassingCars (src & junit)
Refactoring in JUnit
[100%] PermCheck (src & junit)
[100%] TapeEquilibrium (src & jUnit)
[100%] MaxProductOfThree (src & jUnit)
JUnit5 usage memo
html & rails notes
[100%] BinaryGap (src & jUnit)
Step notes until JUnit 5 works on Mac + IntelliJ IDEA