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
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
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
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
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
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
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
Explanation: The NullReturn class is the apache ant class representation of Null.
8. ________________ interface is used by ant attributes.
a) EnableAttribute
b) PropertyExpander
c) GetProperty
d) LocalProperties
View Answer
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
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
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.
- Practice Programming MCQs
- Apply for Computer Science Internship
- Check Programming Books
- Check JUnit Books