JUnit runners are available in which package?
1.org.junit.runners
2. junitfiles.runners
3.org.runners
4.org.junit.files.runners
The ancilliaryTypes parameter of the imposterise() function must all be interfaces.
1.True
2.False
3.all of the mentioned
4.None of the mentioned
The mockObject parameter of imposterise() is the class representing the static type of the imposter.
1.True
2.False
3.none
4.all the mentoined
To create a custom test runner which class needs to be extended?
1.CustomRunner
2.TestRunner
3.Runner
4.UserRunner
To listen to events during a test, which class has to be extended?
1.org.junit.runner.notification.RunListener
2.org.junit.runner.Listener
3.org.junit.runner.notification.Listener
4.org.junit.runner.RunListener
To start a test case as JUnit 3.8 test case which runner is required?
1.org.junit.runners.Junit4
2.org.junit.runners.Parameterized
3.org.junit.internal.runners.Junit38ClassRunner
4.org.junit.internal.runners.Junit4
What is a Façade in JUnit?
1. It is a group of test cases
2. It is a design pattern that provides a unified interface to a set of interfaces in a subsystem
3. It is a collection of superclasses
4. It is a group of mock objects
What type of object is returned on completion of a test?
1.org.junit.runner.Result
2.org.junit.runner.Complete
3. org.junit.runner.Outcome
4. org.junit.runner.Object
A _____ offers services for the components it’s hosting, such as lifecycle, security, transaction, distribution, and so forth.
1.Component
2. Container
3.Mock
4.Appraisal
A _________ is a JUnit Rule that manages JMock expectations and allowances.
1.JunitRuleMockery
2. JmockRuleMockery
3.JunitRule
4.JunitMockery
Stubs test the behavior of faked objects.
1. True
2.False
3.none
4.all the mentoined
Stubs work well to ________ a given class for testing and asserting the state of its instances.
1.Delete
2.Enhance
3.Isolate
4.Append
The biggest advantage of mock objects over in-container testing is that mocks don’t require a ________ container in order to execute tests.
1.Running
2.Closed
3. Open
4.static
The exception thrown by the ActionSequence mehod is _____
1.NullPointer
2.Throwable
3.ArrayIndexOutOfBounds
4.Arithmetic
The invoke method throws which exception?
1.ArrayIndexOutOfBounds
2.StringIndexOutOfBounds
3. Throwable
4. NullPointer
The VoidAction class throws an exception.
1.True
2.False
3.none
4.all the mentoined
The _____ class provides factory methods for the executor services provided in the package.
1. Executors
2.Exceptions
3.ReadOnly
4.AbstractMock
The __________ package contains plugins that make it easier to use jMock with legacy code.
1.org.jmock.api
2.org.jmock.lib.action
3. org.jmock.lib.script
4.org.jmock.lib.legacy
The __________ package contains plugins that make it easier to write custom actions by scripting their behaviour with BeanShell.
1.org.jmock.api
2. org.jmock.lib.action
3.org.jmock.lib.script
4.org.jmock.lib.legacy
To run the file TestClass.class from the command line, we have to type what?
1.java TestClass
2. javac TestClass
3.java org.junit.runner.JUnitCore TestClass
4.org.junit.runner.JUnitCore TestClass
To write a mock object test in JUnit 3, MockObject needs to be extended.
1.True
2.False
3.none
4.all the mentoined
What does the getRunCount() method of the Result return?
1.String denoting the time of execution
2.Integer denoting the time of execution
3. int denoting the number of tests run
4.int denoting the number of failed tests
What information does an object of the Failure class contain?
1.Description of the failed test
2.Description of the failed test and the exception thrown while running it
3.Description of the fail() method
4. Description of the exception thrown
When does the wasSuccessful() method of the Runner class return true?
1.The test file compiled
2.The test file ran
3. Some of the test cases ran successfully
4.All the test cases ran succesfully
_____ creates an action that performs the given script.
1. describeTo(Description description)
2.invoke(Invocation invocation)
3. perform(String script)
4.where(String name, Object value)
_____ is a partial implementation of the Action interface that making it easy to implement actions specific to applications with inline anonymous classes.
1.ActionSequence
2.CustomAction
3.DoAllAction
4.ReturnValueAction
_____ is a TestCase that supports testing with mock objects.
1. JUnit3ErrorTranslator
2. JUnit3Mockery
3.MockObjectTestCase
4. VerifyingTestCase
_____ is a thread local class containing local properties.
1.ParseNextProperty
2.PropertyExpander
3.GetProperty
4.LocalProperties
_____ translates ExpectationErrors into JUnit’s AssertionFailedErrors.
1. JUnit3ErrorTranslator
2. JUnit3Mockery
3.MockObjectTestCase
4.VerifyingTestCase
______ contains helper classes for ant properties.
1.org.apache.tools.ant.property
2.org.apache.tools.ant.types
3.org.apache.tools.ant.util
4. org.apache.tools.ant.taskdefs
______ is a TestCase that verifies postconditions after the test has run and before the fixture has been torn down.
1. JUnit3ErrorTranslator
2. JUnit3Mockery
3.MockObjectTestCase
4.VerifyingTestCase
______ is an abstract class for if/unless attributes.
1.AttributeNamespace
2.BaseIfAttribute
3. IfBlankAttribute
4.IfSetAttribute
______ is the class to resolve properties in a map.
1. LocalPropertyStack
2. ResolvePropertyMap
3.NullReturn
4. ParseProperties
______ is the interface to a class to get a property in apache ant.
1. ParseNextProperty
2. PropertyExpander
3.GetProperty
4.LocalProperties
______ method performs an action in response to an invocation.
1.describeTo(Description description)
2. invoke(Invocation invocation)
3. perform(String script)
4. where(String name, Object value)
______ parses properties using a collection of expanders.
1.LocalPropertyStack
2.ResolvePropertyMap
3.NullReturn
4.ParseProperties
______ returns the next of a sequence of elements each time it is invoked.
1. ActionSequence
2.CustomAction
3.DoAllAction
4.ReturnValueAction
_______ class is used to indicate that the XML namespace (URI) can be used to look for namespace attributes.
1.AttributeNamespace
2. BaseIfAttribute
3.IfBlankAttribute
4.IfSetAttribute
_______ defines a variable that can be referred to by the script.
1. describeTo(Description description)
2.invoke(Invocation invocation)
3.perform(String script)
4.where(String name, Object value)
_______ interface is used by ant attributes.
1.EnableAttribute
2.PropertyExpander
3.GetProperty
4.LocalProperties
_______ is a class to represent a null and to stop the chain of lookups.
1. LocalPropertyStack
2.ResolvePropertyMap
3.NullReturn
4. ParseProperties
_______ is a Mockery that reports expectation errors as JUnit 3 test failures.
1. JUnit3ErrorTranslator
2. JUnit3Mockery
3.MockObjectTestCase
4.VerifyingTestCase
_______ package contains actions that fake the behavior of mocked invocations.
1.org.jmock
2. org.jmock.lib.action
3.org.jmock.lib
4.org.jmock.lib.script
_______ performs multiple actions every time it is invoked.
1. ActionSequence
2. CustomAction
3.DoAllAction
4.ReturnValueAction
________ class is an Action that executes a BeanShell script.
1.ScriptedAction
2.Scripted
3.Action
4.ScriptedActionClass
________ method reports if the Imposteriser is able to imposterise a given type.
1.canImposterise(Class<?> type)
2.Imposterise(Class<?> type)
3.imposterise(Invokable mockObject, Class<T> mockedType, Class<?>… ancilliaryTypes)
4.imposter()
________ returns an Enumeration over a collection.
1.ActionSequence
2.CustomAction
3.DoAllAction
4.ReturnEnumerationAction
________ returns an iterator over a collection.
1.ActionSequence
2. CustomAction
3.ReturnIteratorAction
4.ReturnEnumerationAction
___________ creates an imposter for a given type that forwards Invocations to an Invokable object.
1.canImposterise(Class<?> type)
2.Imposterise(Class<?> type)
3.imposterise(Invokable mockObject, Class<T> mockedType, Class<?>… ancilliaryTypes)
4.imposter()
_____________ class enables to imposterise abstract and concrete classes without calling the constructors of the mocked class.
1.ClassImposteriser
2. Imposteriser
3. ImposterisingClass
4.Imposter