本文整理了Java中com.google.appengine.tck.base.TestContext
类的一些代码示例,展示了TestContext
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TestContext
类的具体详情如下:
包路径:com.google.appengine.tck.base.TestContext
类名称:TestContext
暂无
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
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;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@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;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
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;
}
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
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;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@Deployment
public static WebArchive getDeployment() {
return getTckDeployment(new TestContext()
.setAppEngineWebXmlFile("appengine-web-system-properties.xml"));
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
protected static TestContext newTestContext() {
return new TestContext();
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
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;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@Deployment
public static WebArchive getDeployment() {
return getTckDeployment(new TestContext()
.setAppEngineWebXmlFile("appengine-web-env-variables.xml"));
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@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;
}
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
protected static WebArchive getTckDeployment() {
return getTckDeployment(new TestContext());
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
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;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@Deployment
public static WebArchive getDeployment() {
TestContext context = new TestContext().setWebXmlFile("endpoints-web.xml");
WebArchive war = getDefaultDeployment(context);
war.addPackage(TransformerEndPoint.class.getPackage());
return war;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
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;
}
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@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;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@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;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@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;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
TestContext context = new TestContext();
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@Deployment
public static WebArchive getDeployment() {
TestContext context = new TestContext().setWebXmlFile("endpoints-web.xml");
WebArchive war = getDefaultDeployment(context);
war.addPackage(TestEndPoint.class.getPackage());
return war;
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
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");
}
}
代码示例来源:origin: GoogleCloudPlatform/appengine-tck
@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;
}
内容来源于网络,如有侵权,请联系作者删除!