unit testing assert code example
Example 1: what is assert
In simple words, if the assert condition is true then the
program control will execute the next test step but if the condition is
false, the execution will stop and further test step will not be executed.
Example 2: @test annotation in junit
# Used in JAVA
public class Example {
@Test
public void method() {
org.junit.Assert.assertTrue( new ArrayList().isEmpty() );
}
}