Choose a topic to test your knowledge and improve your Maven skills
JUnit is used for what type of software testing for the Java language?
A JUnit Unit Test Case is compulsorily characterised by a/an known _______ and a/an expected _____
To use JUnit in a project we need to add which JAR files on our test classpath?
What are fixtures in JUnit?
JUnit test methods must compulsorily return what value?
JUnit test files are written in files with which file extension?
What is the purpose of assertArrayEquals(“message”, A, B)?
Which annotation implies that a method is a JUnit test case?
What is a test runner?
Which methods cannot be tested by JUnit test class?
What are Parameterised tests used for in JUnit?
A parameterised test class must carry which annotation?
The test class must carry the @RunWith annotation with the ______ class as its argument.
What will be the outcome for the following piece of code? //The JUnit files are imported public class TestClass { @Test public void testingMethod() { String message = “Test”; assertEquals(3,message.length()); } }
What does the fail() method do in JUnit?
Which annotation must be used to define suite classes?
When is the tearDown() method called in JUnit?
What does the assertTrue(“message”,A) do?
How can a method be made to run before the execution of every test case?
Which method from TestCase class returns the name of a Test case?
The ______ is a container used to gather tests for the purpose of grouping and invocation.
What happens if the tester does not define a Suite?
The Suite object is a _____ that executes all of the @Test annotated methods in the test class.
Suite class is the JUnit 4 equivalent of what feature of JUnit 3.8.x?
For a Suite class, the @RunWith annotation has the value of which class?
Which annotation is used to list all the classes in a suite?
If we want to run test files Test1 and Test2 together, the @SuiteClasses annotation will be?
JUnit Suites are independent of the capability of the ______ system.
Will the second and third assert failures be reported? public class TestFile { @Test public void testMethod() { assertTrue(false); assertTrue(false); assertTrue(false); } }
Which attribute is added to the @Test annotation so that the test passes when an expected exception is thrown?
The ______ is a component that “interacts with a client, controlling and managing the handling of each request”.
An example of a web controller is ____
What are the object(s) which make the core of the description of a controller component?
What is the signature of the addHandler method of the Controller interface?
The principle of “Hollywood Principle: Don’t call us, we’ll call you” is commonly known as ______
Inversion of Control is used to increase __________ of the code.
When the container calls setter methods after invoking a constructor with no arguments it is known as _______
Constructor-based DI is accomplished when the container invokes a class constructor with ______
Constructor-based DI is preferred for ______
In the context of unit testing, the term ___________ is used to contrast and compare the objects you use in your application with the objects that you use to test your application (test objects).
Improving the design of existing code is known as _______
In what order is multiple @Before annotated methods run?
The ______ method confirms that both references are to the same object.
The assertEquals() method uses which underlying method to compare objects?
The equals() method is inherited from which base class?
To use Parameterized.class with the @RunWith annotation, we need to import ____
To avoid overdesigning an interface, usually ____________ is used.
The _________ is a sequential or non-iterative design process, which is used in software development processes, in which progress is seen as flowing steadily downwards.
Controller logic component accesses the ________ logic component.
Overuse of argument _________ can lead to fragile tests.