-
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: 1691
-
Maven and JUnit example
In Maven, you can declare the JUnit dependency like this:
Date: 2019-08-17 View: 1277
-
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: 1390
-
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: 1324
-
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: 1368
-
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: 1542
-
Intellij + Infinitest Continuous Testing
The Infinitest is a continuous testing plugin, it helps to run the test automatically.
Date: 2019-08-17 View: 1451
-
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: 1171
-
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: 1353
-
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: 1661
-
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: 1190
-
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: 1290
-
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: 1254
-
How to install Oracle JDK 8 on CentOS
In this tutorial, we will show you how to install Oracle JDK 8 On CentOS.
Date: 2019-08-17 View: 2137
-
Java Final keyword example
Final keyword in Java is a modifier used to restrict the user from doing unwanted code or preventing from the code or value from being changed. It is possible to use this keyword in 3 contexts. They are:
Date: 2019-08-17 View: 1419