Maven/Maven Mcq Set 1 Sample Test,Sample questions

Question:
 JUnit runners are available in which package?

1.org.junit.runners

2. junitfiles.runners

3.org.runners

4.org.junit.files.runners


Question:
 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


Question:
 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


Question:
 To create a custom test runner which class needs to be extended?

1.CustomRunner

2.TestRunner

3.Runner

4.UserRunner


Question:
 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


Question:
 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


Question:
 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


Question:
 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


Question:
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


Question:
A _________ is a JUnit Rule that manages JMock expectations and allowances.

1.JunitRuleMockery

2. JmockRuleMockery

3.JunitRule

4.JunitMockery


Question:
Stubs test the behavior of faked objects.

1. True

2.False

3.none

4.all the mentoined


Question:
Stubs work well to ________ a given class for testing and asserting the state of its instances.

1.Delete

2.Enhance

3.Isolate

4.Append


Question:
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


Question:
The exception thrown by the ActionSequence mehod is _____

1.NullPointer

2.Throwable

3.ArrayIndexOutOfBounds

4.Arithmetic


Question:
The invoke method throws which exception?

1.ArrayIndexOutOfBounds

2.StringIndexOutOfBounds

3. Throwable

4. NullPointer


Question:
The VoidAction class throws an exception.

1.True

2.False

3.none

4.all the mentoined


Question:
The _____ class provides factory methods for the executor services provided in the package.

1. Executors

2.Exceptions

3.ReadOnly

4.AbstractMock


Question:
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


Question:
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


Question:
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


Question:
To write a mock object test in JUnit 3, MockObject needs to be extended.

1.True

2.False

3.none

4.all the mentoined


Question:
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


Question:
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


Question:
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


Question:
_____ 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)


Question:
_____ 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


Question:
_____ is a TestCase that supports testing with mock objects.

1. JUnit3ErrorTranslator

2. JUnit3Mockery

3.MockObjectTestCase

4. VerifyingTestCase


Question:
_____ is a thread local class containing local properties.

1.ParseNextProperty

2.PropertyExpander

3.GetProperty

4.LocalProperties


Question:
_____ translates ExpectationErrors into JUnit’s AssertionFailedErrors.

1. JUnit3ErrorTranslator

2. JUnit3Mockery

3.MockObjectTestCase

4.VerifyingTestCase


Question:
______ 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


Question:
______ 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


Question:
______ is an abstract class for if/unless attributes.

1.AttributeNamespace

2.BaseIfAttribute

3. IfBlankAttribute

4.IfSetAttribute


Question:
______ is the class to resolve properties in a map.

1. LocalPropertyStack

2. ResolvePropertyMap

3.NullReturn

4. ParseProperties


Question:
______ is the interface to a class to get a property in apache ant.

1. ParseNextProperty

2. PropertyExpander

3.GetProperty

4.LocalProperties


Question:
______ 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)


Question:
______ parses properties using a collection of expanders.

1.LocalPropertyStack

2.ResolvePropertyMap

3.NullReturn

4.ParseProperties


Question:
______ returns the next of a sequence of elements each time it is invoked.

1. ActionSequence

2.CustomAction

3.DoAllAction

4.ReturnValueAction


Question:
_______ 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


Question:
_______ 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)


Question:
_______ interface is used by ant attributes.

1.EnableAttribute

2.PropertyExpander

3.GetProperty

4.LocalProperties


Question:
_______ is a class to represent a null and to stop the chain of lookups.

1. LocalPropertyStack

2.ResolvePropertyMap

3.NullReturn

4. ParseProperties


Question:
_______ is a Mockery that reports expectation errors as JUnit 3 test failures.

1. JUnit3ErrorTranslator

2. JUnit3Mockery

3.MockObjectTestCase

4.VerifyingTestCase


Question:
_______ 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


Question:
_______ performs multiple actions every time it is invoked.

1. ActionSequence

2. CustomAction

3.DoAllAction

4.ReturnValueAction


Question:
________ class is an Action that executes a BeanShell script.

1.ScriptedAction

2.Scripted

3.Action

4.ScriptedActionClass


Question:
________ 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()


Question:
________ returns an Enumeration over a collection.

1.ActionSequence

2.CustomAction

3.DoAllAction

4.ReturnEnumerationAction


Question:
________ returns an iterator over a collection.

1.ActionSequence

2. CustomAction

3.ReturnIteratorAction

4.ReturnEnumerationAction


Question:
___________ 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()


Question:
_____________ class enables to imposterise abstract and concrete classes without calling the constructors of the mocked class.

1.ClassImposteriser

2. Imposteriser

3. ImposterisingClass

4.Imposter


More MCQS

  1. Maven Mcq Set 1
  2. Maven Mcq Set 2
  3. Maven Mcq Set 3
  4. Maven Mcq Set 4
  5. Maven Mcq Set 5
  6. Maven Mcq Set 6
  7. Maven Mcq Set 7
Learn Maven Mcq Set 1,Learn Maven Objetive choice questions and answers,Maven Multiple choice questions and answers,Maven objective, Maven questions , Maven answers,Maven MCQs questions and answer
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!