JUnit Questions and Answers – Continuous Integration

«

This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on ” Continuous Integration”.

1. _____________ checks if an attribute is blank or not.
a) BaseIfAttribute
b) IfBlankAttribute
c) IfTrueAttribute
d) IfSetAttribute
View Answer

Answer: b
Explanation: IfBlankAttribute.Unless is the “unless” version of ifBlankAttribute.
advertisement

2. ______________ check if an attribute value is true or not.
a) BaseIfAttribute
b) IfBlankAttribute
c) IfTrueAttribute
d) IfSetAttribute
View Answer

Answer: c
Explanation: IfTrueAttribute.Unless is the “unless” version of ifTrueAttribute.

3. _____________ is an interface indicating that a reader may be chained to another one.
a) TokenFilter.Filter
b) BaseFilterReader
c) BaseParamFilterReader
d) ChainableReader
View Answer

Answer: d
Explanation: The ChainableReader interface indicates that a reader may be chained to another one.

4. ______________ is the base class for core filter readers.
a) TokenFilter.Filter
b) BaseFilterReader
c) BaseParamFilterReader
d) ChainableReader
View Answer

Answer: b
Explanation: The original filter reader is only used for chaining purposes, never for filtering purposes.
advertisement

5. ______________ is a parameterized base class for core filter readers.
a) TokenFilter.Filter
b) BaseFilterReader
c) BaseParamFilterReader
d) ChainableReader
View Answer

Answer: c
Explanation: The constructor is public BaseParamFilterReader(java.io.Reader in).

6. _______________ class is used for assembling the constants declared in a Java class in key1=value1(line separator)key2=value2 format.
a) ClassConstants
b) BaseFilterReader
c) BaseParamFilterReader
d) ChainableReader
View Answer

Answer: a
Explanation: The ClassConstants filter uses the BCEL external toolkit.

7. ______________ converts text to local OS formatting conventions along with repairing the text damaged by file transfer programs.
a) ClassConstants
b) BaseFilterReader
c) BaseParamFilterReader
d) FixCrLfFilter
View Answer

Answer: d
Explanation:FixCrLfFilter generalises the handling of EOL characters, and allows for CR-only line endings.
advertisement

8. ________________ reads the first n lines of a stream.
a) ClassConstants
b) HeadFilter
c) BaseParamFilterReader
d) FixCrLfFilter
View Answer

Answer: b
Explanation: The constructor public HeadFilter(java.io.Reader in) creates a new filtered reader.

9. _______________ is a Sax2 based project reader.
a) AntXMLContext
b) DefaultExecutor
c) ProjectHelperImpl
d) ProjectHelper2
View Answer

Answer: d
Explanation: ProjectHelper 2 can be used to check whether this instance of ProjectHelper can parse an Antlib descriptor given by the URL.

10. ______________ is a “Single-check” Target executor implementation.
a) SingleCheckExecutor
b) DefaultExecutor
c) ProjectHelperImpl
d) ProjectHelper2
View Answer

Answer: a
Explanation: SingleCheckExecutor differs from DefaultExecutor in that the dependencies for all targets are computed together.

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

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