-
Logback Set log file name programmatically
In Logback, it is easy to set a log file name programmatically :
Date: 2019-08-17 View: 2449
-
Gradle and JUnit example
In Gradle, you can declare the JUnit dependency like this:
Date: 2019-08-17 View: 1455
-
Java Swing JOptionPane showInputDialog example
This is a review of the showInputDialog() method of JOptionPane Class. With this method we can prompt the user for input while customizing our dialog window. The showConfirmDialog returns either String or Object and can be called using the following combinations of parameters:
Date: 2019-08-17 View: 1753
-
Maven and JUnit example
In Maven, you can declare the JUnit dependency like this:
Date: 2019-08-17 View: 1329
-
Hamcrest How to assertThat check null value?
Try to check null value with the Hamcrest assertThat assertion, but no idea how?
Date: 2019-08-17 View: 1433
-
JUnit How to test a List
First, exclude the JUnit bundled copy of hamcrest-core, and include the useful hamcrest-library, it contains many useful methods to test the List data type.
Date: 2019-08-17 View: 1366
-
JUnit How to test a Map
Forget about JUnit assertEquals(), to test a Map, uses the more expressive IsMapContaining class from hamcrest-library.jar
Date: 2019-08-17 View: 1418
-
Intellij IDEA How to build project automatically
By default, Intellij IDEA doesn’t compile classes automatically. But, you can enable the auto compile feature by following steps :
Date: 2019-08-17 View: 1577
-
Intellij + Infinitest Continuous Testing
The Infinitest is a continuous testing plugin, it helps to run the test automatically.
Date: 2019-08-17 View: 1512
-
JUnit Run test in a particular order
In JUnit, you can use @FixMethodOrder(MethodSorters.NAME_ASCENDING) to run the test methods by method name, in lexicographic order.
Date: 2019-08-17 View: 1217
-
Java Custom Exception Examples
In Java, there are two types of exceptions – checked and unchecked exception. Here’s the summary :
Date: 2019-08-17 View: 1403
-
JUnit Assert if a property exists in a class
Includes hamcrest-library and test the class property and its value with hasProperty() :
Date: 2019-08-17 View: 1708
-
JUnit Categories Test
In JUnit, you can organize the test cases into different categories, and run those categorized test cases with @Categories.ExcludeCategory or @Categories.IncludeCategory
Date: 2019-08-17 View: 1228
-
JUnit + Spring integration example
In this tutorial, we will show you how to test the Spring DI components with JUnit frameworks.
Date: 2019-08-17 View: 1338
-
Unit Test What is Mocking? and Why?
In simple, mocking is creating objects that mimic the behavior of real objects. Refer to the following case study :
Date: 2019-08-17 View: 1297