Java JUnit brief note

Test class method description

Prerequisite class

public class TestMethods {

/**

setUpBeforeClass A method that is executed before the first test method of this test class is called tearDownAfterClass Method executed after the last test method of this test class is called setUp Methods executed before each test method is called tearDown

Methods of the org.junit.Assert class

assertArrayEquaals If the expected value and the actual value are equal, the process ends normally. If they are not equal, it ends in failure asertEquals If the expected value and the actual value are equal, the process ends normally. Failure if not equal assertFalse If the actual value is false, the process ends normally. If true, it ends in failure assertNotNull If the actual value is not null, it ends normally. Fails if null assertNotSame If the expected value and the actual value do not have the same reference, the process ends normally. If the same reference is made, it ends in failure assertNull If the actual value is null, it ends normally. Fails if not null assertSame If the expected value and the actual value have the same reference, the process ends normally. If you do not make the same reference, it will end in failure assertTrue If the actual value is true, the process ends normally. If false, it ends in failure fail Fails when this method is executed Method executed after each test method is called testIsBlank Test method for isBlank method of the class under test testIsInt Test method for isInt method of the class under test

Recommended Posts

Java JUnit brief note
Java abstract modifier [Note]
[Java] Internal Iterator Note
[java] Java SE 8 Silver Note
[Note] Java: String search
[Note] Java: String survey
My Study Note (Java)
java: Add date [Note]
A note about Java GC
[Java] JUnit4 test case example
(Note) Java classes / variables / methods
[100%] MissingInteger (src & junit & author's note)
[100%] [GenomicRangeQuery] (src & junit & author's note)
[100%] MaxCounters (src & junit & author's note)
[100%] Distinct (src & junit & author's note)
[100%] CountDiv (src & junit & author's note)
[Java] [Spring] Spring Boot 1.4-> 1.2 Downgrade Note
Study Java with Progate Note 1
Note
[Note] Java Silver SE8 qualification acquired
[Java] Points to note with Arrays.asList ()
Note
Note 1: Elementary, stumbling blocks (java, javascript)
Java
[Note] Handling of Java decimal point
Introducing Java tips GreenMail to Junit5
My note: Introducing Java to Ubuntu
junit
[Java] Test private methods with JUnit
A brief description of JAVA dependencies
Java
Note: Differences from Java as seen from C #
Pass parameters when debugging vscode java. [Note]
[Beginner] Java method / class / external library [Note 23]
Java SE 8 Silver (Java SE 8 Programmer I) Pass Note
Basic knowledge of Java development Note writing
Note: next ・ nextLine (paiza learning Java introduction 9: # 06)
[Note] Cooperation between Java and DB (basic)
How to use Java Scanner class (Note)
Java automated test implementation with JUnit 5 + Gradle