The _________ rule can be used to test both exception type and message.
1. Expected
2.ExpectedException
3.CatchException
4.Catch
______ is used only to improve the readability of the statements.
1.anything
2.is
3. sameInstance
4.nullValue
@Test(timeout = 130) implies a time limit of ______
1.130 milliseconds
2. 130 minutes
3. 130 seconds
4.1.30 minutes
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()
A/An __________ property is an array instead of a single value.
1.Indexed
2. valued
3.null
4.variable
AOP forms a basis for ______
1.Functional Development
2. Object Oriented Programming
3.Datafield Development
4.Aspect Oriented Software Development
assertThat(0.03, is(closeTo(1.0, 0.03))) is _____
1. True
2. False
3. Null
4. Error
assertThat(1.03, is(closeTo(1.0, 0.03))) is _____
1.True
2.False
3.Null
4. Error
Class JUnitMatchers extends _______
1. java.lang.Object
2. java.lang.String
3.java.util.*
4.java.util.Arrays
Custom JUnit rules can be created using _______
1.TestRule Interface
2.TestRule Interface
3.RuleCreate Interface
4.RuleInitialize Interface
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
Hamcrest is not a _______ framework in itself.
1.Matching
2.Testing
3.Asserting
4.Checking
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()
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
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()
The instanceOf matcher is equivalent to ________
1.isCompatibleType
2.isCompatible
3.isInstance
4. isSame
The isCloseTo class extends which base class?
1.Matcher
2.HamcrestCore
3.TypeMatcher
4.TypeSafeMatcher
The JUnit hasItem() function is a _______
1.Hamcrest Matcher
2.Instance Function
3. JUnitMatcher
4.Matcher
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
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
The Timeout Rule implements which interface?
1.Timeout
2. Test
3.TestingTimeout
4.TestRule
The TypeSafeMatcher implements the __________ interface.
1.Self
2.Describing
3.EqulityCheck
4. SelfDescribing
The _____ parameter is used along with the @Test annotation to test for timeouts.
1.Expected
2.Timeout
3.NoLimit
4.Time
The ___________ method of the TypeSafeMatcher class is made final.
1.matches
2.matchesSafely
3.describeMismatchSafely
4.No mehtod
The ____________ matcher checks if a given key is in a map.
1.hasEntry
2.hasValue
3.hasKey
4. isKey
Timeout testing is _____
1.Software Dependent
2. Hardware Dependent
3. Software and Hardware Dependent
4.Software and Hardware Independent
To define a ________ in a JavaBean class, public getter and setter methods have to be supplied.
1.Class
2.Object
3.Value
4.Property
To write custom matcher _____________ has to be implemented.
1. Matcher Interface
2.Hamcrest Interface
3.HamcrestMatching Interface
4.Not possible to implement
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
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
What does a specified timeout of 0 imply?
1.130 milliseconds
2.130 minutes
3.130 seconds
4. Not set
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
Where is the Timeout class present?
1.org.junit.rules.Timeout
2.org.junit.Timeout
3.org.Timeout
4.org.junit.RuleClasses.Timeout
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
Which Hamcrest matcher is just like the && operator?
1.Is
2.Anything
3.sameInstance
4.allOf
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
_____ is used for combining those matchers which must both pass.
1.all
2.both
3. justTwo
4.matchTwo
______ checks to see if any of the contained matchers match.
1.anyOf
2.allOf
3. instanceOf
4.notNull
______ Hamcrest matcher can be used to match absolutely everything.
1. Is
2.AnyOf
3. Anything
4. Not set
______ is a library that contains a lot of helpful matcher objects , ported in several languages.
1.Java
2.Pygame
3.AllenWake
4.Hamcrest
______ 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
______ is used to test object identity.
1. instanceOf
2. isCompatibleType
3.type
4. sameInstance
______ tests whether a JavaBean has a particular property.
1.isProperty
2. porperty
3. hasProperty
4.isPresent
_______ describes a class of functions which when run modify other functions.
1.Class
2.Advice
3.Modifiers
4.Changers
_______ Hamcrest matcher tests for null values.
1. isNull
2. nullValue
3. isNullValue
4.isNullable
_______ is the base class for all Matcher implementations.
1.MatcherBase
2.Base
3.Matcher
4.BaseMatcher
_______ tests whether a given Map has a given entry.
1.hasItem
2.hasItems
3.hasValue
4.hasEntry
________ can be useful in adding additional functionality which applies to every test within a test class.
1.Copy
2.Rules
3.Exceptions
4.Boundaries
________ traverses the meaning of the contained matchers.
1.not
2.or
3. allOf
4.andAll
__________ tests whether a given string equals another one, ignoring the case.
1. stringEqual
2. equalToIgnoringCase
3.ignoringCaseEqual
4.equalToCase