protected static WebArchive getBaseDeployment() { TestContext context = new TestContext(); context.setWebXmlFile("oauth-web.xml"); WebArchive war = getTckDeployment(context); war.addClasses(OAuthTestBase.class, OAuthServiceServlet.class, OAuthServletAnswer.class); return war; }
@Deployment public static WebArchive getDeployment() { WebArchive archive = getTckDeployment(new TestContext() .setAppEngineWebXmlFile("appengine-web-admin-staticfiles.xml") .setWebXmlFile("web-security-constraint.xml")); createFile(archive, "/admin/index.html"); return archive; }
protected static WebArchive getDefaultDeployment() { TestContext context = new TestContext().setUseSystemProperties(true).setCompatibilityProperties(TCK_PROPERTIES); context.setWebXmlFile("xmpp-web.xml"); context.setAppEngineWebXmlFile("xmpp-appengine-web.xml"); WebArchive war = getTckDeployment(context); war.addClasses(XmppTestBase.class, XmppMessageServlet.class); return war; } }
protected static WebArchive getDefaultDeployment() { TestContext context = new TestContext().setUseSystemProperties(true).setCompatibilityProperties(TCK_PROPERTIES); WebArchive war = getTckDeployment(context); war.addClass(AppIdentityTestBase.class); war.addPackage(EmailValidator.class.getPackage()); return war; }
@Deployment public static WebArchive getDeployment() { return getTckDeployment(new TestContext() .setAppEngineWebXmlFile("appengine-web-system-properties.xml")); }
protected static TestContext newTestContext() { return new TestContext(); }
protected static Archive getDeploymentWithLoggingLevelSetTo(Level level) { TestContext context = newTestContext().setAppEngineWebXmlFile("appengine-web-with-logging-properties.xml"); WebArchive war = getDefaultDeployment(context); war.addClass(LoggingConfigurationTestBase.class); war.addAsWebInfResource(new StringAsset(".level=" + level.getName()), "logging.properties"); return war; }
@Deployment public static WebArchive getDeployment() { return getTckDeployment(new TestContext() .setAppEngineWebXmlFile("appengine-web-env-variables.xml")); }
@Deployment public static WebArchive getDeployment() { // -Dtck.gcs.bucket TestContext context = new TestContext().setUseSystemProperties(true).setCompatibilityProperties(TCK_PROPERTIES); WebArchive war = getTckDeployment(context); war.addClass(GCSClientTestBase.class); LibUtils libUtils = new LibUtils(); libUtils.addLibrary(war, "com.google.guava", "guava"); libUtils.addLibrary(war, "com.google.appengine.tools", "appengine-gcs-client"); return war; } }
protected static WebArchive getTckDeployment() { return getTckDeployment(new TestContext()); }
protected static WebArchive getDefaultDeployment(TestContext context) { context.setAppEngineWebXmlFile("appengine-web-with-logging-properties.xml"); WebArchive war = getTckDeployment(context); war.addClasses(LoggingTestBase.class, TestBase.class) // classes for Base64.isBase64() .addClasses(Base64.class, BaseNCodec.class) .addClasses(BinaryEncoder.class, Encoder.class) .addClasses(BinaryDecoder.class, Decoder.class) .addClasses(EncoderException.class, DecoderException.class) .addAsWebInfResource("currentTimeUsec.jsp") .addAsWebInfResource("doNothing.jsp") .addAsWebInfResource("storeTestData.jsp") .addAsWebInfResource("throwException.jsp") .addAsWebInfResource("log4j-test.properties") .addAsWebInfResource("logging-all.properties"); return war; }
@Deployment public static WebArchive getDeployment() { TestContext context = new TestContext().setWebXmlFile("endpoints-web.xml"); WebArchive war = getDefaultDeployment(context); war.addPackage(TransformerEndPoint.class.getPackage()); return war; }
protected static WebArchive getBytemanDeployment() { TestContext context = new TestContext(); context.setWebXmlFile("bm-web.xml"); context.setAppEngineWebXmlFile("bm-appengine-web.xml"); WebArchive war = getTckDeployment(context); war.addClass(BytemanTestBase.class); war.addClasses(ConcurrentTxServlet.class, Poke.class); return war; } }
@Deployment public static WebArchive getDeployment() { WebArchive archive = getTckDeployment(new TestContext() .setAppEngineWebXmlFile("appengine-web-headers-static-files.xml")); createFile(archive, "/with-header/foo.txt"); createFile(archive, "/with-expiration/foo.txt"); createFile(archive, "/with-default-expiration/foo.txt"); return archive; }
@Deployment public static WebArchive getDeployment() { // -Dtck.sql.connection=//my_project:test_instance // -Dtck.sql.user // -Dtck.sql.pw TestContext context = new TestContext().setUseSystemProperties(true).setCompatibilityProperties(TCK_PROPERTIES); // Declares usage of com.mysql.jdbc.GoogleDriver context.setAppEngineWebXmlFile("sql-appengine-web.xml"); WebArchive war = getTckDeployment(context); war.addClasses(CloudSqlTestBase.class, SqlUtil.class); return war; }
@Deployment public static WebArchive getDeployment() { TestContext context = new TestContext().setUseSystemProperties(true).setCompatibilityProperties(TCK_PROPERTIES); WebArchive war = getTckDeployment(context); war.addPackage(Data.class.getPackage()); LibUtils libUtils = new LibUtils(); libUtils.addLibrary(war, "com.googlecode.objectify", "objectify"); libUtils.addLibrary(war, "com.google.guava", "guava"); return war; }
TestContext context = new TestContext();
@Deployment public static WebArchive getDeployment() { TestContext context = new TestContext().setWebXmlFile("endpoints-web.xml"); WebArchive war = getDefaultDeployment(context); war.addPackage(TestEndPoint.class.getPackage()); return war; }
protected static WebArchive getBaseDeployment(boolean enabled) { System.setProperty("appengine.warmup.enabled", Boolean.toString(enabled)); try { TestContext context = new TestContext(); context.setWebXmlFile("web-warmup.xml"); context.setAppEngineWebXmlFile("appengine-web-warmup.xml"); WebArchive war = getTckDeployment(context); war.addClass(AbstractWarmupTestBase.class); war.addClass(WarmupServlet.class); war.addClass(WarmupData.class); return war; } finally { System.clearProperty("appengine.warmup.enabled"); } }
@Deployment public static WebArchive getDeployment() { WebArchive archive = getTckDeployment(new TestContext() .setAppEngineWebXmlFile("appengine-web-public-root-static-files.xml")); createFile(archive, "/static/foo.txt"); createFile(archive, "/static/subdir/foo.txt"); createFile(archive, "/bar.txt"); return archive; }