JUnit Questions and Answers – Maven Downsides

This set of Basic JUnit Questions and Answers focuses on “Maven Downsides”.

1. The biggest advantage of mock objects over in-container testing is that mocks don’t require a ________ container in order to execute tests.
a) Running
b) Closed
c) Open
d) Static
View Answer

Answer: a
Explanation: Tests can be set up quickly and run quickly when using mock objects.

2. ___________ contains helper classes for ant properties.
a) org.apache.tools.ant.property
b) org.apache.tools.ant.types
c) org.apache.tools.ant.util
d) org.apache.tools.ant.taskdefs
View Answer

Answer: a
Explanation: The package org.apache.tools.ant.property of apache ant contains helper classes for ant properties.

3. ____________ is the interface to a class to get a property in apache ant.
a) ParseNextProperty
b) PropertyExpander
c) GetProperty
d) LocalProperties
View Answer

Answer: c
Explanation: The GetProperty interface is normally the interface to the PropertyHelper class.
advertisement
advertisement

4. ___________ is a thread local class containing local properties.
a) ParseNextProperty
b) PropertyExpander
c) GetProperty
d) LocalProperties
View Answer

Answer: d
Explanation: The LocalProperties is a class of org.apache.tools.ant.property that contains local properties.

5. ___________ is the class to resolve properties in a map.
a) LocalPropertyStack
b) ResolvePropertyMap
c) NullReturn
d) ParseProperties
View Answer

Answer: b
Explanation: The ResolvePropertyMap class is used to resolve properties in a map.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. ___________ parses properties using a collection of expanders.
a) LocalPropertyStack
b) ResolvePropertyMap
c) NullReturn
d) ParseProperties
View Answer

Answer: d
Explanation: The constructor of the ParseProperties class is public ParseProperties(Project project,java.util.Collection <PropertyExpander> expanders, GetProperty getProperty).

7. _________ is a class to represent a null and to stop the chain of lookups.
a) LocalPropertyStack
b) ResolvePropertyMap
c) NullReturn
d) ParseProperties
View Answer

Answer: c
Explanation: The NullReturn class is the apache ant class representation of Null.
advertisement

8. ________________ interface is used by ant attributes.
a) EnableAttribute
b) PropertyExpander
c) GetProperty
d) LocalProperties
View Answer

Answer: a
Explanation: The EnableAttribute interface is used by all apache ant attributes.

9. _____________ class is used to indicate that the XML namespace (URI) can be used to look for namespace attributes.
a) AttributeNamespace
b) BaseIfAttribute
c) IfBlankAttribute
d) IfSetAttribute
View Answer

Answer: a
Explanation: The AttributeNamespace class is useful for indication of XML namespace.
advertisement

10. ____________ is an abstract class for if/unless attributes.
a) AttributeNamespace
b) BaseIfAttribute
c) IfBlankAttribute
d) IfSetAttribute
View Answer

Answer: b
Explanation: BaseIfAttribute contains a Boolean flag to specify whether this is an, if or unless attribute.

Sanfoundry Global Education & Learning Series – JUnit.
To practice basic questions and answers on all areas of Junit, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
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.