Home / CSE MCQs / JUnit MCQs :: JUnit Mastering JUnit

CSE MCQs :: JUnit MCQs

  1. Which Hamcrest matcher is just like the && operator?
  2. A.
    Is
    B.
    Anything
    C.
    sameInstance
    D.
    allOf

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. ______________ Hamcrest matcher can be used to match absolutely everything.
  4. A.
    Is
    B.
    AnyOf
    C.
    Anything
    D.
    Not

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. AOP forms a basis for __________
  6. A.
    Functional Development
    B.
    Object Oriented Programming
    C.
    Datafield Development
    D.
    Aspect Oriented Software Development

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. The _________ rule can be used to test both exception type and message.
  8. A.
    Expected
    B.
    ExpectedException
    C.
    CatchException
    D.
    Catch

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. In what order is multiple @Before annotated methods run?
  10. A.
    Oldest First
    B.
    Newest First
    C.
    Randomly
    D.
    According to argument list

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. To avoid overdesigning an interface, usually ____________ is used.
  12. A.
    Agile Development
    B.
    Test Driven Development
    C.
    Base Design Development
    D.
    Waterfall Development

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Constructor-based DI is accomplished when the container invokes a class constructor with ____________
  14. A.
    A number of arguments
    B.
    No argument
    C.
    Just one argument
    D.
    Null objects

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Inversion of Control is used to increase __________ of the code.
  16. A.
    Functionality
    B.
    Cleanliness
    C.
    Effectiveness
    D.
    Modularity

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Timeout testing is ____________
  18. A.
    Software Dependent
    B.
    Hardware Dependent
    C.
    Software and Hardware Dependent
    D.
    Software and Hardware Independent

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. The Timeout Rule implements which interface?
  20. A.
    Timeout
    B.
    Test
    C.
    TestingTimeout
    D.
    TestRule

    View Answer

    Workspace

    Discuss Discuss in Forum