×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

EasyMock Multiple-Choice Questions (MCQs)

EasyMock is an open-source testing framework for Java released under the Apache License. The framework allows the creation of test double objects for the purpose of Test-driven Development or Behavior Driven Development. (Wikipedia)

EasyMock MCQs: This section contains multiple-choice questions and answers on the various topics of EasyMock. Practice these MCQs to test and enhance your skills on EasyMock.

List of EasyMock MCQs

1. Which programming language is the foundation of the EasyMock Library?

  1. Java
  2. Python
  3. Ruby
  4. C++
  5. C#

Answer: A) Java

Explanation:

Java is the foundation of the EasyMock library.

Discuss this Question


2. EasyMock library is used for ____?

  1. Developing a Software
  2. Deploying a software application
  3. Unit testing
  4. None

Answer: C) Unit testing

Explanation:

EasyMock library is used for unit testing.

Discuss this Question


3. ____ is a technique for testing a class's functionality in isolation.

  1. Nice Mock
  2. Disparaging
  3. Replay
  4. Mocking

Answer: D) Mocking

Explanation:

Mocking is a technique for testing a class's functionality in isolation.

Discuss this Question


4. Does Mocking require a database connection?

  1. Yes
  2. No

Answer: B) No

Explanation:

Mocking does not require a database connection.

Discuss this Question


5. ____- are simulated objects that imitate the behavior of actual objects in the system under test?

  1. Mock object
  2. Nice Mock
  3. Strict Mock

Answer: A) Mock object

Explanation:

Mock objects are simulated objects that imitate the behavior of actual objects in the system under test.

Discuss this Question


6. Is it possible to create a mock by calling one of its constructors?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, it is possible to create a mock by calling one of its constructors.

Discuss this Question


7. ____ annotation specifies the item that will be tested?

  1. @test
  2. @tested
  3. @object_test

Answer: B) @tested

Explanation:

@tested annotation specifies the item that will be tested.

Discuss this Question


8. Which of the following annotation is used to generate a mock class object?

  1. @object
  2. @mock_object
  3. @object@mock
  4. @mock

Answer: D) @mock

Explanation:

@mock annotation is used to generate a mock class object.

Discuss this Question


9. EasyMock determines whether or not a mock is being utilized by using which method.

  1. Check()
  2. CheckMock()
  3. Verify()
  4. VerifyMock()

Answer: C) Verify()

Explanation:

Verify() method is used to determine whether or not a mock is being utilized.

Discuss this Question


10. A ____ object replicates the behavior of only certain of its methods.

  1. Partial Mock
  2. Nice Mock
  3. Strict Mock

Answer: A) Partial Mock

Explanation:

A partial mock object replicates the behaviour of only certain of its methods.

Discuss this Question


11. Private methods cannot be mocked?

  1. True
  2. False

Answer: A) True

Explanation:

Private methods cannot be mocked.

Discuss this Question


12. If easymock.notThreadSafeByDefault=True then ____?

  1. By default, a mock will be thread-safe.
  2. By default, a mock will not be thread-safe.
  3. None

Answer: B) By default, a mock will not be thread-safe.

Explanation:

If easymock.notThreadSafeByDefault=True then, By default, a mock will not be thread-safe.

Discuss this Question


13. Mock Objects can be reset using ____?

  1. refresh (mock)
  2. reboot (mock)
  3. reset (mock)

Answer: C) reset (mock)

Explanation:

Mock Objects can be reset using reset (mock).

Discuss this Question


14. Which of the following are the alternatives to EasyMock?

  1. Mockito
  2. PowerMock
  3. WireMock
  4. All of the above

Answer: D) All of the above

Explanation:

Following are the alternatives to EasyMock:

  • Mockito
  • PowerMock
  • WireMock

Discuss this Question


15. Can Easymock be used on Android?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, Easymock can be used on Android.

Discuss this Question


16. ____ can be used as an OSGi bundle.

  1. Easy object jar
  2. Mock jar Object
  3. EasyMock Object
  4. EasyMock jar

Answer: D) EasyMock jar

Explanation:

EasyMock jar can be used as an OSGi bundle.

Discuss this Question


17. Mocks are thread-safe by default during the replay phase.

  1. True
  2. False

Answer: A) True

Explanation:

Mocks are thread-safe by default during the replay phase.

Discuss this Question


18. A mock is ____ thread-safe during recording.

  1. Purely
  2. Partially
  3. Not
  4. None of the above

Answer: C) Not

Explanation:

A mock is not thread-safe during recording.

Discuss this Question


19. Mocks can be serialized at any point throughout their lifespan?

  1. True
  2. False

Answer: A) True

Explanation:

True, Mocks can be serialized at any point throughout their lifespan.

Discuss this Question


20. After being created, a ____ Mock Object has order checking enabled.

  1. Normal
  2. Strict
  3. Partial

Answer: B) Strict

Explanation:

After being created, a strict Mock Object has order checking enabled.

Discuss this Question




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.