Hey !
I am doing a test and i need some help with the following questions:
1. What is JUnit testing?
a) A way of writing the code.
b) A guideline with best practices.
c) A programming language used with Java.
d) A framework used for testing.
The right answer should be d?
2. How to assert that 2 arrays are equals?
a) assertTrue(a==b);
b) assertArrayEquals(array1, array2);
c) assertTrue(a!=b);
d) assertTrue(a===b);
The right answer should be ...?
3. What will be a result of including following line that uses assertThat static method from AssertJ library in unit test: assertThat("SDA".equalsIgnoreCase("sda")).isTrue() ;
a) It can be true or false depending on the operating system.
b) Syntax is not correct.
c) Assertion is always true, test will pass (if there are no other assertions or exceptions).
d) Assertion will fail.
The right answer should be ...?
Kind regards,
Squish