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

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.

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

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.

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.

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

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.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn