JUnit Questions and Answers – Ant Targets, Projects, Properties and Tasks

This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on “Ant Targets, Projects, Properties and Tasks”. 1. ________________ creates a mock builder allowing to create a partial mock for the given class or interface. a) createMockBuilder(Class<T> toMock) b) createMock(Class<T> toMock) c) createNiceControl() d) createNiceMock(Class<T> toMock) 2. The ____________ interface is used in the … Read more

advertisement

JUnit Questions and Answers – Ant

This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on “Ant”. 1. Mocks are Trojan horses because they replace real ___________ from the inside, without the calling classes being aware of it. a) Methods b) Objects c) Variables d) Classes 2. When we’re talking about mock objects, a/an _________ is a feature built … Read more

advertisement

JUnit Questions and Answers – Comparing Stubs, Mock Objects and In-container Testing

This set of JUnit Questions and Answers for Aptitude Test focuses on “Comparing Stubs, Mock Objects and In-container Testing”. 1. To implement a custom URL protocol handler, the URL method __________ is called. a) setURLStreamHandlerFactory b) setURLStreamFactory c) setURLStreamHandlerFactorySetting d) setStreamHandlerFactory 2. _________ replace the objects with which the methods under test collaborate, offering a … Read more

advertisement

JUnit Questions and Answers – In-container Testing

This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on “In-container Testing”. 1. When unit testing, it’s important to be able to control as much as possible of the environment in which the tests execute. a) True b) False 2. _______________ is a Java HTTP (Web) server and Java Servlet container. a) Maven … Read more

advertisement

JUnit Questions and Answers – The Mock Objects Solution

This set of JUnit Questions and Answers for Campus Interviews focuses on “The Mock Objects Solution”. 1. Using old tests to guard against new changes is a form of ______________ a) Unit Testing b) Integration Testing c) Regression Testing d) Loss Testing 2. A ________ is a piece of code that’s inserted at runtime in … Read more

advertisement

JUnit Questions and Answers – Limitations of Standard Unit Testing

This set of JUnit Questions and Answers for Entrance Exams focuses on “Limitations of Standard Unit Testing”. 1. ___________ is favoured over conditionals to better write testable code. a) Polymorphism b) Composition c) Inheritance d) Overloading 2. _____________ is a programming practice that expects new code to be written only if an automated test has … Read more

advertisement

JUnit Questions and Answers – JMock

This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on ” JMock”. 1. The Cobertura command for merging datafiles is ________________ a) cobertura-report.bat b) cobertura-instrument.bat c) cobertura-check.bat d) cobertura-merge.bat 2. In order to write testable code, ______________ should be reduced as much as possible. a) Dependencies b) Redundancies c) Objects d) Classes 3. … Read more

advertisement

JUnit Questions and Answers – EasyMock

This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on “EasyMock”. 1. The Cobertura command to run while reporting is ____________ a) cobertura-report.bat b) cobertura-instrument.bat c) cobertura-check.bat d) cobertura-merge.bat 2. The ____________ parameter is used to specify the type of report. a) datafile b) basedir c) encoding d) format 3. ____________ parameter specifies … Read more

advertisement

JUnit Questions and Answers – Using Mocks as Trojan Horses

This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on “Using Mocks as Trojan Horses”. 1. _________ is a free Java tool that calculates the percentage of code accessed by tests. a) Cobertura b) JUnit c) XUnit d) Maven 2. Cobertura is based on ____________ a) JUnit b) XUnit c) Maven d) Jcoverage … Read more

advertisement

JUnit Questions and Answers – Mocking an HTTP Connection

This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on “Mocking an HTTP Connection”. 1. The __________ test relies exclusively on the external system interface to verify its correctness. a) White Box b) Unit c) Black Box d) Loss 2. In black box testing, all that is needed to know in order to … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.