Spring/Spring Mcq Set 10 Sample Test,Sample questions

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


Question:
 An object that simulates a dependent object:-

1.stub

2.mock

3. test

4.None of the mentioned


Question:
 DispatcherPortlet resolves a view name from one or more view resolver beans.

1.True

2.False

3.none

4.all the mentoined


Question:
 In portlets, there are URLs:-

1. render

2.action

3.all of the mentioned

4.None of the mentioned


Question:
 Test data sets are provided by data providers, which are methods with the:-

1.@DataProvider

2.@Autowire

3.@JTest

4.None of the mentioned


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


Question:
 The preceding controller handles portlet requests:-

1. render requests

2.action requests

3.all of the mentioned

4.None of the mentioned


Question:
 Unlike in a web application, you can’t control URLs directly in a portlet.

1.True

2.False

3.none

4.all the mentoined


Question:
 You can chain multiple handler mapping annotations as required to portlet.

1.True

2.False

3.none

4.all the mentoined


Question:
AbstractJUnit38SpringContext class also implements the ApplicationContextAware interface.

1.True

2.False

3.none

4.all the mentoined


Question:
After Controller has finished handling a render request, it returns:-

1.model name

2.view name

3.view obect

4.All of the mentioned


Question:
An Object which usually knows how its methods are expected to be called:-

1. stub

2.mock

3. test

4.none of the mentioned


Question:
Annotation for SpringJUnit4ClassRunner:-

1.@Run

2.@RunWith

3.All of the mentioned

4.None of the mentioned


Question:
Annotation for TransactionalTestExecutionListener:-

1.@Transactional

2. @RunWith

3.@Run

4.None of the mentioned


Question:
Attribute which specifies the exception type:-

1.after

2.expected

3.before

4.Test execution listener


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


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


Question:
DispatcherServtlet dispatches portlet requests to appropriate handlers that handle the requests.

1. True

2. False

3.none

4.all the mentoined


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


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


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


Question:
JUnit 4 allows you to annotate your test methods with:-

1.@Test

2.@Autowire

3. @JTest

4.None of the mentioned


Question:
Libraries that can help create mock objects:-

1. EasyMock

2.jMock

3. All of the mentioned

4.None of the mentioned


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


Question:
Method to indicate that the application context is dirty.

1.getDirty()

2.setDirty()

3.all of the mentioned

4.None of the mentioned


Question:
Method to perform cleanup tasks:-

1.finalize

2.tearDown

3.all of the mentioned

4.None of the mentioned


Question:
portlet deployment descriptor file is:-

1.portlet.xml

2.portlet.config

3. portlet.xhtml

4. none of the mentioned


Question:
Servlet Listener to load the root application context at startup.

1.ContextLoader

2.ContextLoaderListener

3.All of the mentioned

4.None of the mentioned


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


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


Question:
Spring provides convenient TestContext support classes for:-

1. JUnit3

2. JUnit4

3.TestNG5

4.All of the mentioned


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


Question:
Spring supports web controller testing by providing Servlet API:-

1.MockHttpServletRequest

2.MockHttpServletResponse

3.MockHttpSession

4.MockHttpSession


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


Question:
Test fixtures injected from the managed application context by annotating:-

1. @Autowired

2.@Resource

3. All of the mentioned

4.None of the mentioned


Question:
Test used to test several units in combination as a whole.

1.Integration tests

2.JUnit4

3.TestNG5

4.All of the mentioned


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


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


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


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


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


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


Question:
This encapsulates the context of a test’s execution:-

1.Test context

2.Test context manager

3. Test context listener

4.Test execution listener


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


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


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


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


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


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


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


More MCQS

  1. Spring Mcq Set 1
  2. Spring Mcq Set 2
  3. Spring Mcq Set 3
  4. Spring Mcq Set 4
  5. Spring Mcq Set 5
  6. Spring Mcq Set 6
  7. Spring Mcq Set 7
  8. Spring Mcq Set 8
  9. Spring Mcq Set 9
  10. Spring Mcq Set 10
  11. Spring Mcq Set 11
  12. Spring Mcq Set 12
  13. Spring Mcq Set 13
  14. Spring Mcq Set 14
  15. Spring Mcq Set 15
  16. Spring Mcq Set 16
  17. Spring Mcq Set 17
  18. Spring Mcq Set 18
  19. Spring Mcq Set 19
  20. Spring Mcq Questions
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite 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!