Class BaseWebIntegrationTest

java.lang.Object
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
ubic.gemma.core.util.test.BaseTest
ubic.gemma.web.util.BaseWebIntegrationTest
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
BaseSpringWebTest, ErrorPagesTest, ExpressionDataFileUploadControllerTest, MessageSourceTest, ProgressStatusControllerTest, SignupControllerTest

@ActiveProfiles("web") @WebAppConfiguration @ContextConfiguration(locations="classpath*:ubic/gemma/applicationContext-*.xml") @ContextConfiguration(locations="classpath*:WEB-INF/gemma-servlet.xml") public abstract class BaseWebIntegrationTest extends BaseTest
Base class for web integration tests.

For a unit-test web test, use BaseWebTest.

Author:
poirigui
  • Field Summary

    Fields inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final org.springframework.test.web.servlet.ResultActions
    perform(org.springframework.test.web.servlet.RequestBuilder requestBuilder)
     
    final void
    Setup the authentication for the test.
    final void
    Clear the SecurityContextHolder so that subsequent tests don't inherit authentication.

    Methods inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests

    setApplicationContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseWebIntegrationTest

      public BaseWebIntegrationTest()
  • Method Details

    • setUpAuthentication

      public final void setUpAuthentication()
      Setup the authentication for the test.

      The default is to grant an administrator authority to the current user.

    • tearDownSecurityContext

      public final void tearDownSecurityContext()
      Clear the SecurityContextHolder so that subsequent tests don't inherit authentication.
    • perform

      protected final org.springframework.test.web.servlet.ResultActions perform(org.springframework.test.web.servlet.RequestBuilder requestBuilder) throws Exception
      Throws:
      Exception