AbstractDependencyInjectionSpringContextTests supports dependency injection.
1. auto-wires beans by type via setter methods
2.auto-wires beans by name via protected fields
3.none of the mentioned
4.All of the mentioned
An object that simulates a dependent object:-
1.stub
2.mock
3. test
4.None of the mentioned
DispatcherPortlet resolves a view name from one or more view resolver beans.
1.True
2.False
3.none
4.all the mentoined
In portlets, there are URLs:-
1. render
2.action
3.all of the mentioned
4.None of the mentioned
Test data sets are provided by data providers, which are methods with the:-
1.@DataProvider
2.@Autowire
3.@JTest
4.None of the mentioned
TestContext support class AbstractJUnit4SpringContextTests, you can also have test fixtures injected from the managed application context.
1.True
2.False
3.none
4.all the mentoined
The preceding controller handles portlet requests:-
1. render requests
2.action requests
3.all of the mentioned
4.None of the mentioned
Unlike in a web application, you can’t control URLs directly in a portlet.
1.True
2.False
3.none
4.all the mentoined
You can chain multiple handler mapping annotations as required to portlet.
1.True
2.False
3.none
4.all the mentoined
AbstractJUnit38SpringContext class also implements the ApplicationContextAware interface.
1.True
2.False
3.none
4.all the mentoined
After Controller has finished handling a render request, it returns:-
1.model name
2.view name
3.view obect
4.All of the mentioned
An Object which usually knows how its methods are expected to be called:-
1. stub
2.mock
3. test
4.none of the mentioned
Annotation for SpringJUnit4ClassRunner:-
1.@Run
2.@RunWith
3.All of the mentioned
4.None of the mentioned
Annotation for TransactionalTestExecutionListener:-
1.@Transactional
2. @RunWith
3.@Run
4.None of the mentioned
Attribute which specifies the exception type:-
1.after
2.expected
3.before
4.Test execution listener
Base class to access the managed application context through the inherited getApplicationContext() method.
1. AbstractSingleSpringContextTests
2.AbstractSingleSpring
3. Test context listener
4.Test execution listener
Command to create a Spring MVC controller that provides a UI:-
1.controller scaff –class ~.web.CustomerController –entity ~.domain.Customer
2.controller scaff –class ~.web.CustomerController –entity
3. none of the mentioned
4.All of the mentioned
DispatcherServtlet dispatches portlet requests to appropriate handlers that handle the requests.
1. True
2. False
3.none
4.all the mentoined
In JUnit 4, you can simply run your test with the test runner SpringJUnit4ClassRunner.
1.True
2.False
3.none
4.None of the mentioned
In JUnit4, to explicitly specify a Spring-specific test runner for running your test.
1.SpringJUnit4ClassRunner
2.SpringJUnit4Class
3.SpringJUnit4
4. none of the mentioned
Interface which can provide access to the managed application context through the protected field applicationContext:-
1. ApplicationContextAware
2.ApplicationContext
3.ApplicationContextAwareContext
4.None of the mentioned
JUnit 4 allows you to annotate your test methods with:-
1.@Test
2.@Autowire
3. @JTest
4.None of the mentioned
Libraries that can help create mock objects:-
1. EasyMock
2.jMock
3. All of the mentioned
4.None of the mentioned
Maps each request to a handler through one or more handler mapping beans.
1.DispatcherServlet
2. DispatcherPortlet
3.All of the mentioned
4.None of the mentioned
Method to indicate that the application context is dirty.
1.getDirty()
2.setDirty()
3.all of the mentioned
4.None of the mentioned
Method to perform cleanup tasks:-
1.finalize
2.tearDown
3.all of the mentioned
4.None of the mentioned
portlet deployment descriptor file is:-
1.portlet.xml
2.portlet.config
3. portlet.xhtml
4. none of the mentioned
Servlet Listener to load the root application context at startup.
1.ContextLoader
2.ContextLoaderListener
3.All of the mentioned
4.None of the mentioned
Spring application context, src/main/resources/META-INF/spring/applicationContext.xml consists of:-
1.Data Source
2.JPA Transaction Manager
3.JPA entity manager factory
4.All of the mentioned
Spring JUnit 3 legacy support in releases prior to 2.5, your test class can extend the:-
1. AbstractDependencyInjectionSpringContextTests
2. AbstractSingleSpringContextTests
3. All of the mentioned
4.None of the mentioned
Spring provides convenient TestContext support classes for:-
1. JUnit3
2. JUnit4
3.TestNG5
4.All of the mentioned
Spring Roo’s root folder (or any of the source packages) is:-
1.src/main/java, src/main/resources
2. src/test/java
3.src/test/resources
4. all of the mentioned
Spring supports web controller testing by providing Servlet API:-
1.MockHttpServletRequest
2.MockHttpServletResponse
3.MockHttpSession
4.MockHttpSession
Starting from Spring 2.5, the TestContext framework provides a test execution listener related to transaction management:-
1.TransactionalTestExecutionListener
2.TransactionalTestExecution
3.All of the mentioned
4.None of the mentioned
Test fixtures injected from the managed application context by annotating:-
1. @Autowired
2.@Resource
3. All of the mentioned
4.None of the mentioned
Test used to test several units in combination as a whole.
1.Integration tests
2.JUnit4
3.TestNG5
4.All of the mentioned
The file which is the standard JPA configuration file to enable the Hibernate-based JPA implementation.
1.src/main/resources/META-INF/spring/database.properties
2.src/main/resources/META-INF/persistence.xml
3.src/main/resources/META-INF/pom.xml
4.None of the mentioned
The static assert methods is declared in the:-
1.org.junit.Assert
2.org.junit.*
3. all of the mentioned
4. none of the mentioned
The submission URL of this form should be a portlet action URL that will trigger an action request to the current portlet.
1.True
2. False
3.none
4.all the mentoined
The TestContext framework provides two test execution listeners related to context management:-
1.DependencyInjectionTestExecutionListener
2. DirtiesContextTestExecutionListener
3. All of the mentioned
4. none of the mentioned
This class implements the ApplicationContextAware interface, so you can get access to the managed application context:-
1.AbstractJUnit38SpringContext
2.AbstractJUnit38Spring
3.AbstractJUnit38SpringContextTests
4. none of the mentioned
This defines a listener interface; by implementing this, you can listen to test execution events.
1.Test context
2.Test context manager
3.Test context listener
4.Test execution listener
This encapsulates the context of a test’s execution:-
1.Test context
2.Test context manager
3. Test context listener
4.Test execution listener
This manages a test context for a test and triggers test execution listeners:-
1.Test context
2.Test context manager
3.Test context listener
4.Test execution listener
To deploy the application to a web container:-
1.mvn tomcat:run
2.mvn jetty:run
3.all of the mentioned
4. none of the mentioned
Usually, a test and its target class are located in the same package, but the source files of tests are stored in a separate directory.
1.True
2. False
3.none
4.all the mentoined
When a user triggers a render URL, the portlet container will ask all the portlets in the same page to handle a render request to render its view.
1.True
2.False
3.none
4.all the mentoined
When a user triggers an action URL in a portlet, the portlet container will first ask the target portlet to handle an action request.
1.True
2.False
3.none
4.all the mentoined
When handling a render request, it gets the time zone attribute from the portlet preference.
1.True
2.False
3.none
4.all the mentoined
When handling an action request, it gets the time zone parameter from the portlet request.
1.True
2.False
3.none
4.all the mentoined