Menu
Popular Courses
Search

MCQs


Total Questions : 10
Question 1. Which Hamcrest matcher is just like the && operator?
  1.    Is
  2.    Anything
  3.    sameInstance
  4.    allOf
 Discuss Question
Answer: Option D. -> allOf


Checks to see if all contained matchers match (just like the && operator).


Question 2. AOP forms a basis for __________
  1.    Functional Development
  2.    Object Oriented Programming
  3.    Datafield Development
  4.    Aspect Oriented Software Development
 Discuss Question
Answer: Option D. -> Aspect Oriented Software Development


AOSD seeks modularization of systems.


Question 3. The _________ rule can be used to test both exception type and message.
  1.    Expected
  2.    ExpectedException
  3.    CatchException
  4.    Catch
 Discuss Question
Answer: Option B. -> ExpectedException


Since JUnit 4.7, ExpectedException can be used to test both exception type and message.


Question 4. ______________ Hamcrest matcher can be used to match absolutely everything.
  1.    Is
  2.    AnyOf
  3.    Anything
  4.    Not
 Discuss Question
Answer: Option C. -> Anything


Matches absolutely anything. Useful in some cases where one wants to make the assert statement more readable.


Question 5. In what order is multiple @Before annotated methods run?
  1.    Oldest First
  2.    Newest First
  3.    Randomly
  4.    According to argument list
 Discuss Question
Answer: Option C. -> Randomly


It is not certain which @Before annotated method will run first as all run randomly.


Question 6. To avoid overdesigning an interface, usually ____________ is used.
  1.    Agile Development
  2.    Test Driven Development
  3.    Base Design Development
  4.    Waterfall Development
 Discuss Question
Answer: Option B. -> Test Driven Development


Since test driven development is reliant on a very short development cycle being repeated, it is used to avoid overdesigning an interface.


Question 7. The Timeout Rule implements which interface?
  1.    Timeout
  2.    Test
  3.    TestingTimeout
  4.    TestRule
 Discuss Question
Answer: Option D. -> TestRule


The TestRule interface is extended and implemented by Timeout Rule.


Question 8. Constructor-based DI is accomplished when the container invokes a class constructor with ____________
  1.    A number of arguments
  2.    No argument
  3.    Just one argument
  4.    Null objects
 Discuss Question
Answer: Option A. -> A number of arguments


Each argument represents a dependency on some other class.


Question 9. Timeout testing is ____________
  1.    Software Dependent
  2.    Hardware Dependent
  3.    Software and Hardware Dependent
  4.    Software and Hardware Independent
 Discuss Question
Answer: Option C. -> Software and Hardware Dependent


Since different software and hardware gives different performance, timeout testing is software and hardware dependent.


Question 10. Inversion of Control is used to increase __________ of the code.
  1.    Functionality
  2.    Cleanliness
  3.    Effectiveness
  4.    Modularity
 Discuss Question
Answer: Option D. -> Modularity


Inversion of control makes the code more extensible resulting in more modular code.


Share this page with your friends!

Share this page with your friends!

Latest Videos

Chapter 1 - GLOBAL STEEL SCENARIO & INDI Part 1 : (13-04-2024) INDUSTRY AND COMPANY AWARENESS (ICA)
Direction Sense Test Part 1 Reasoning (Hindi)
Chapter 1 - RMHP / OHP / OB & BP Part 1 : (14-02-2024) GPOE
Cube & Cuboid Part 1 Reasoning (Hindi)
Data Interpretation (DI) Basic Concept Reasoning (Hindi)
Counting Figures Part 1 Counting Of Straight Lines Reasoning (Hindi)
Real Numbers Part 7 Class 10 Maths
Real Numbers Part 1 Class 10 Maths
Polynomials Part 1 Class 10 Maths

Latest Test Papers

Chapter 3.1 : Overview of Finance & Acco Chapter 3 : Finance & Accounts SAIL E0 - GFM 2024
Chapter 2.1 : Overview Chapter 2 : Materials Management SAIL E0 - GFM 2024
Chapter 1.1 : Personnel Functions- An ov Chapter 1 : Personnel Management SAIL E0 - GFM 2024
GPOE / GPA Combined 1 Free CBT Mock Test SAIL E0 2024
CBT Mixed Test 1 GPOE/GPA SAIL E0 2024