MockServletContext.<init>
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.apache.webbeans.web.lifecycle.test.MockServletContext.<init> (Showing top 7 results out of 315)

  • Common ways to obtain MockServletContext
private void myMethod () {
MockServletContext m =
  • new MockServletContext()
  • Smart code suggestions by Codota
}
origin: org.apache.openwebbeans/openwebbeans-web

public MockServletContextEvent()
{
  super(new MockServletContext());
}
origin: org.apache.tomee/openejb-core

@SuppressWarnings("unchecked")
public void before(final Object inputTestInstance) throws Exception {
  fixFakeClassFinder(inputTestInstance);
  startContainer(inputTestInstance);
  servletContext = new MockServletContext();
  session = new MockHttpSession();
  deployApp(inputTestInstance);
}
origin: org.apache.openejb/openejb-core

private OpenEjbContainer(final Map<?, ?> map, final AppContext appContext) {
  webBeanContext = appContext.getWebBeansContext();
  globalJndiContext = new GlobalContext(appContext.getGlobalJndiContext());
  final Properties properties = new Properties();
  properties.putAll(map);
  options = new Options(properties);
  startNetworkServices();
  servletContext = new MockServletContext();
  session = new MockHttpSession();
  try {
    startContexts(webBeanContext.getContextsService(), servletContext, session);
  } catch (final Exception e) {
    logger().warning("can't start all CDI contexts", e);
  }
}
origin: org.apache.tomee/openejb-core

private OpenEjbContainer(final Map<?, ?> map, final AppContext appContext) {
  webBeanContext = appContext.getWebBeansContext();
  globalJndiContext = new GlobalContext(appContext.getGlobalJndiContext());
  final Properties properties = new Properties();
  properties.putAll(map);
  options = new Options(properties);
  startNetworkServices();
  if (webBeanContext != null) {
    servletContext = new MockServletContext();
    session = new MockHttpSession();
    try {
      startContexts(webBeanContext.getContextsService(), servletContext, session);
    } catch (final Exception e) {
      logger().warning("can't start all CDI contexts", e);
    }
  }
}
origin: org.apache.openejb/arquillian-openejb-embedded-4

private DeploymentInfo quickDeploy(final Archive<?> archive, final TestClass testClass) throws DeploymentException {
  final String name = archive.getName();
  DeploymentInfo info = DEPLOYMENT_INFO.get(name);
  if (info == null) {
    try {
      final AppModule module = OpenEJBArchiveProcessor.createModule(archive, testClass);
      final AppInfo appInfo = configurationFactory.configureApplication(module);
      final AppContext appCtx = assembler.createApplication(appInfo, module.getClassLoader());
      final ServletContext appServletContext = new MockServletContext();
      final HttpSession appSession = new MockHttpSession();
      startContexts(appCtx.getWebBeansContext().getContextsService(), appServletContext, appSession);
      info = new DeploymentInfo(appServletContext, appSession, appInfo, appCtx);
      if (configuration.isSingleDeploymentByArchiveName(name)) {
        DEPLOYMENT_INFO.putIfAbsent(name, info);
      }
    } catch (final Exception e) {
      throw new DeploymentException("can't deploy " + name, e);
    }
  }
  return info;
}
origin: org.apache.tomee/arquillian-openejb-embedded

final ServletContext appServletContext = new MockServletContext();
final HttpSession appSession = new MockHttpSession();
origin: org.apache.openejb/openejb-core

servletContext = new MockServletContext();
session = new MockHttpSession();
org.apache.webbeans.web.lifecycle.testMockServletContext<init>

Popular methods of MockServletContext

  • getResource
  • getResourceAsStream

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JPanel (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)