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

Posted Date:-2022-01-08 07:47:40


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

Posted Date:-2022-01-08 07:23:43


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

Posted Date:-2022-01-08 07:23:09


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

1.CustomRunner

2.TestRunner

3.Runner

4.UserRunner

Posted Date:-2022-01-08 07:50:31


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

Posted Date:-2022-01-08 07:51:21


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

Posted Date:-2022-01-08 07:48:08


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

Posted Date:-2022-01-08 07:49:57


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

Posted Date:-2022-01-08 07:50:55


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

Posted Date:-2022-01-08 07:38:05


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

1.JunitRuleMockery

2. JmockRuleMockery

3.JunitRule

4.JunitMockery

Posted Date:-2022-01-08 07:36:50


Question:
Stubs test the behavior of faked objects.

1. True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-08 07:38:49


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

Posted Date:-2022-01-08 07:38:31


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

Posted Date:-2022-01-08 07:40:37


Question:
The exception thrown by the ActionSequence mehod is _____

1.NullPointer

2.Throwable

3.ArrayIndexOutOfBounds

4.Arithmetic

Posted Date:-2022-01-08 07:29:10


Question:
The invoke method throws which exception?

1.ArrayIndexOutOfBounds

2.StringIndexOutOfBounds

3. Throwable

4. NullPointer

Posted Date:-2022-01-08 07:26:27


Question:
The VoidAction class throws an exception.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-08 07:31:27


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

1. Executors

2.Exceptions

3.ReadOnly

4.AbstractMock

Posted Date:-2022-01-08 07:37:24


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

Posted Date:-2022-01-07 11:48:18


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

Posted Date:-2022-01-08 07:24:27


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

Posted Date:-2022-01-08 07:52:17


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

Posted Date:-2022-01-08 07:36:19


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

Posted Date:-2022-01-08 07:52:50


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

Posted Date:-2022-01-08 07:53:17


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

Posted Date:-2022-01-08 07:51:51


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)

Posted Date:-2022-01-08 07:27:24


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

Posted Date:-2022-01-08 07:29:38


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

1. JUnit3ErrorTranslator

2. JUnit3Mockery

3.MockObjectTestCase

4. VerifyingTestCase

Posted Date:-2022-01-08 07:35:31


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

1.ParseNextProperty

2.PropertyExpander

3.GetProperty

4.LocalProperties

Posted Date:-2022-01-08 07:43:35


Question:
_____ translates ExpectationErrors into JUnit’s AssertionFailedErrors.

1. JUnit3ErrorTranslator

2. JUnit3Mockery

3.MockObjectTestCase

4.VerifyingTestCase

Posted Date:-2022-01-08 07:34:39


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

Posted Date:-2022-01-08 07:42:38


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

Posted Date:-2022-01-08 07:35:59


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

1.AttributeNamespace

2.BaseIfAttribute

3. IfBlankAttribute

4.IfSetAttribute

Posted Date:-2022-01-08 07:46:37


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

1. LocalPropertyStack

2. ResolvePropertyMap

3.NullReturn

4. ParseProperties

Posted Date:-2022-01-08 07:44:01


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

1. ParseNextProperty

2. PropertyExpander

3.GetProperty

4.LocalProperties

Posted Date:-2022-01-08 07:43:09


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)

Posted Date:-2022-01-08 07:25:55


Question:
______ parses properties using a collection of expanders.

1.LocalPropertyStack

2.ResolvePropertyMap

3.NullReturn

4.ParseProperties

Posted Date:-2022-01-08 07:44:31


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

1. ActionSequence

2.CustomAction

3.DoAllAction

4.ReturnValueAction

Posted Date:-2022-01-08 07:28:43


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

Posted Date:-2022-01-08 07:46:10


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)

Posted Date:-2022-01-08 07:27:52


Question:
_______ interface is used by ant attributes.

1.EnableAttribute

2.PropertyExpander

3.GetProperty

4.LocalProperties

Posted Date:-2022-01-08 07:45:30


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

1. LocalPropertyStack

2.ResolvePropertyMap

3.NullReturn

4. ParseProperties

Posted Date:-2022-01-08 07:45:03


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

1. JUnit3ErrorTranslator

2. JUnit3Mockery

3.MockObjectTestCase

4.VerifyingTestCase

Posted Date:-2022-01-08 07:35:06


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

Posted Date:-2022-01-08 07:28:17


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

1. ActionSequence

2. CustomAction

3.DoAllAction

4.ReturnValueAction

Posted Date:-2022-01-08 07:30:05


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

1.ScriptedAction

2.Scripted

3.Action

4.ScriptedActionClass

Posted Date:-2022-01-08 07:25:28


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()

Posted Date:-2022-01-07 11:50:55


Question:
________ returns an Enumeration over a collection.

1.ActionSequence

2.CustomAction

3.DoAllAction

4.ReturnEnumerationAction

Posted Date:-2022-01-08 07:30:36


Question:
________ returns an iterator over a collection.

1.ActionSequence

2. CustomAction

3.ReturnIteratorAction

4.ReturnEnumerationAction

Posted Date:-2022-01-08 07:31:09


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()

Posted Date:-2022-01-07 11:52:06


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

Posted Date:-2022-01-07 11:49:37


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
Search
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!