Maven/Maven Mcq Set 3 Sample Test,Sample questions

adplus-dvertising

Question:
 The _________ rule can be used to test both exception type and message.

1. Expected

2.ExpectedException

3.CatchException

4.Catch

Posted Date:-2022-01-08 01:47:03


Question:
 ______ is used only to improve the readability of the statements.

1.anything

2.is

3. sameInstance

4.nullValue

Posted Date:-2022-01-08 01:59:31


Question:
@Test(timeout = 130) implies a time limit of ______

1.130 milliseconds

2. 130 minutes

3. 130 seconds

4.1.30 minutes

Posted Date:-2022-01-08 01:50:46


Question:
A Timeout Rule is initialized by _______

1.@Rule public Timeout object = new Timeout()

2.@Rule public Timeout object = Timeout.seconds()

3. public Timeout object = Timeout.seconds()

4. public Timeout object = new Timeout()

Posted Date:-2022-01-08 01:52:28


Question:
A/An __________ property is an array instead of a single value.

1.Indexed

2. valued

3.null

4.variable

Posted Date:-2022-01-08 02:07:12


Question:
AOP forms a basis for ______

1.Functional Development

2. Object Oriented Programming

3.Datafield Development

4.Aspect Oriented Software Development

Posted Date:-2022-01-08 01:45:35


Question:
assertThat(0.03, is(closeTo(1.0, 0.03))) is _____

1. True

2. False

3. Null

4. Error

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


Question:
assertThat(1.03, is(closeTo(1.0, 0.03))) is _____

1.True

2.False

3.Null

4. Error

Posted Date:-2022-01-08 02:09:20


Question:
Class JUnitMatchers extends _______

1. java.lang.Object

2. java.lang.String

3.java.util.*

4.java.util.Arrays

Posted Date:-2022-01-08 02:04:54


Question:
Custom JUnit rules can be created using _______

1.TestRule Interface

2.TestRule Interface

3.RuleCreate Interface

4.RuleInitialize Interface

Posted Date:-2022-01-08 01:46:12


Question:
ExpectedException is found under which package?

1.org.junit.ExpectedException

2.org.junit.Test.ExpectedException

3. org.junit.Rule.ExpectedException

4.org.junit.rules.ExpectedException

Posted Date:-2022-01-08 01:47:34


Question:
Hamcrest is not a _______ framework in itself.

1.Matching

2.Testing

3.Asserting

4.Checking

Posted Date:-2022-01-08 01:55:17


Question:
If a timeout which has been specified lapses before the completion of the test, its execution is interrupted with _____

1. Interrupt()

2.Thread.interrupt()

3.Thread.interruptable()

4.Threads.interruptable()

Posted Date:-2022-01-08 01:53:43


Question:
The closeTo function is found under which package?

1.org.hamcrest.TypeSafeMatcher

2.org.hamcrest.BaseMatcher

3.org.hamcrest.number.IsCloseTo

4.org.hamcrest.number.CloseTo

Posted Date:-2022-01-08 02:10:21


Question:
The correct way to initialise an ExpectedException object is _____

1.public ExpectedException thrown = ExpectedException.none()

2. @Rule public ExpectedException thrown

3.@Rule public ExpectedException thrown = ExpectedException.none()

4.public ExpectedException thrown = ExpectedException.none()

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


Question:
The instanceOf matcher is equivalent to ________

1.isCompatibleType

2.isCompatible

3.isInstance

4. isSame

Posted Date:-2022-01-08 02:02:50


Question:
The isCloseTo class extends which base class?

1.Matcher

2.HamcrestCore

3.TypeMatcher

4.TypeSafeMatcher

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


Question:
The JUnit hasItem() function is a _______

1.Hamcrest Matcher

2.Instance Function

3. JUnitMatcher

4.Matcher

Posted Date:-2022-01-08 02:04:01


Question:
The package for the assertThat() function is?

1.org.hamcrest.CoreMatchers.assertThat

2.org.junit.Assert.assertThat

3.org.junit.JunitMatchers.assertThat

4.org.junit.hasItem.assertThat

Posted Date:-2022-01-08 01:55:37


Question:
The package to which hasItem() function belongs is ________

1. org.junit.JUnitMatchers.hasItem

2. org.junit.JUnitMatchers.hasItem

3.org.junit.Junit.hasItem

4.org.junit.hamcrest.hasItem

Posted Date:-2022-01-08 02:04:30


Question:
The Timeout Rule implements which interface?

1.Timeout

2. Test

3.TestingTimeout

4.TestRule

Posted Date:-2022-01-08 01:53:16


Question:
The TypeSafeMatcher implements the __________ interface.

1.Self

2.Describing

3.EqulityCheck

4. SelfDescribing

Posted Date:-2022-01-08 02:11:35


Question:
The _____ parameter is used along with the @Test annotation to test for timeouts.

1.Expected

2.Timeout

3.NoLimit

4.Time

Posted Date:-2022-01-08 01:50:16


Question:
The ___________ method of the TypeSafeMatcher class is made final.

1.matches

2.matchesSafely

3.describeMismatchSafely

4.No mehtod

Posted Date:-2022-01-08 02:11:11


Question:
The ____________ matcher checks if a given key is in a map.

1.hasEntry

2.hasValue

3.hasKey

4. isKey

Posted Date:-2022-01-08 02:12:03


Question:
Timeout testing is _____

1.Software Dependent

2. Hardware Dependent

3. Software and Hardware Dependent

4.Software and Hardware Independent

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


Question:
To define a ________ in a JavaBean class, public getter and setter methods have to be supplied.

1.Class

2.Object

3.Value

4.Property

Posted Date:-2022-01-08 02:06:46


Question:
To write custom matcher _____________ has to be implemented.

1. Matcher Interface

2.Hamcrest Interface

3.HamcrestMatching Interface

4.Not possible to implement

Posted Date:-2022-01-08 02:12:28


Question:
What applies the same timeout to every test method of a class?

1. @Timeout

2.@Expected

3. Timeout Rule

4.Not possible to apply same timeout

Posted Date:-2022-01-08 01:52:02


Question:
What are exceptions?

1. Anomalous conditions requiring special processing

2.Extra methods written to increase functionality

3. Commented lines describing exceptional cases

4.Null objects

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


Question:
What does a specified timeout of 0 imply?

1.130 milliseconds

2.130 minutes

3.130 seconds

4. Not set

Posted Date:-2022-01-08 01:54:13


Question:
What is timeout testing?

1.Testing for exceptions

2.Testing code execution within time limits

3.Testing code correctness

4.Testing code with time functions

Posted Date:-2022-01-08 01:49:20


Question:
Where is the Timeout class present?

1.org.junit.rules.Timeout

2.org.junit.Timeout

3.org.Timeout

4.org.junit.RuleClasses.Timeout

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


Question:
Which Hamcrest core matcher checks if a number is equal to a number of some acceptable error?

1.closeTo

2.equals

3.errorBy

4.similarTo

Posted Date:-2022-01-08 02:08:46


Question:
Which Hamcrest matcher is just like the && operator?

1.Is

2.Anything

3.sameInstance

4.allOf

Posted Date:-2022-01-08 02:00:00


Question:
With the ‘expected’ argument, one cannot ________

1. Test a method

2. Test for exception type

3.Test the value of the message in the exception

4.Test for specific exception

Posted Date:-2022-01-08 01:46:38


Question:
_____ is used for combining those matchers which must both pass.

1.all

2.both

3. justTwo

4.matchTwo

Posted Date:-2022-01-08 02:05:19


Question:
______ checks to see if any of the contained matchers match.

1.anyOf

2.allOf

3. instanceOf

4.notNull

Posted Date:-2022-01-08 02:00:43


Question:
______ Hamcrest matcher can be used to match absolutely everything.

1. Is

2.AnyOf

3. Anything

4. Not set

Posted Date:-2022-01-08 01:58:25


Question:
______ is a library that contains a lot of helpful matcher objects , ported in several languages.

1.Java

2.Pygame

3.AllenWake

4.Hamcrest

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


Question:
______ is a programming paradigm which allows the separation of cross cutting concerns, hence, increasing modularity.

1. Functional Programming

2. Object Oriented Programming

3.Aspect Oriented Programming

4.Data Injections

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


Question:
______ is used to test object identity.

1. instanceOf

2. isCompatibleType

3.type

4. sameInstance

Posted Date:-2022-01-08 02:03:16


Question:
______ tests whether a JavaBean has a particular property.

1.isProperty

2. porperty

3. hasProperty

4.isPresent

Posted Date:-2022-01-08 02:06:13


Question:
_______ describes a class of functions which when run modify other functions.

1.Class

2.Advice

3.Modifiers

4.Changers

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


Question:
_______ Hamcrest matcher tests for null values.

1. isNull

2. nullValue

3. isNullValue

4.isNullable

Posted Date:-2022-01-08 02:05:47


Question:
_______ is the base class for all Matcher implementations.

1.MatcherBase

2.Base

3.Matcher

4.BaseMatcher

Posted Date:-2022-01-08 02:12:54


Question:
_______ tests whether a given Map has a given entry.

1.hasItem

2.hasItems

3.hasValue

4.hasEntry

Posted Date:-2022-01-08 02:08:05


Question:
________ can be useful in adding additional functionality which applies to every test within a test class.

1.Copy

2.Rules

3.Exceptions

4.Boundaries

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


Question:
________ traverses the meaning of the contained matchers.

1.not

2.or

3. allOf

4.andAll

Posted Date:-2022-01-08 02:01:12


Question:
__________ tests whether a given string equals another one, ignoring the case.

1. stringEqual

2. equalToIgnoringCase

3.ignoringCaseEqual

4.equalToCase

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


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!