本文整理汇总了Java中play.test.Helpers.running方法的典型用法代码示例。如果您正苦于以下问题:Java Helpers.running方法的具体用法?Java Helpers.running怎么用?Java Helpers.running使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类play.test.Helpers
的用法示例。
在下文中一共展示了Helpers.running方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldAddGeolocationToCacheWhenCacheIsOn
import play.test.Helpers; //导入方法依赖的package包/类
@Test
public void shouldAddGeolocationToCacheWhenCacheIsOn() {
Application application = getApplication(true);
Helpers.running(application, () -> {
Geolocation geolocation = new Geolocation(ipAddress, countryCode);
GeolocationCache cache = application.injector().instanceOf(GeolocationCache.class);
cache.set(geolocation);
Assert.assertThat(cache.get(ipAddress), CoreMatchers.notNullValue());
});
}
示例2: shouldNotAddGeolocationToCacheWhenCacheIsOff
import play.test.Helpers; //导入方法依赖的package包/类
@Test
public void shouldNotAddGeolocationToCacheWhenCacheIsOff() {
Application application = getApplication(false);
Helpers.running(application, () -> {
Geolocation geolocation = new Geolocation(ipAddress, countryCode);
GeolocationCache cache = application.injector().instanceOf(GeolocationCache.class);
cache.set(geolocation);
Assert.assertThat(cache.get(ipAddress), CoreMatchers.nullValue());
});
}
示例3: navAdminChrome
import play.test.Helpers; //导入方法依赖的package包/类
/**
* Test method for running a successful login and the right presentation of
* the activity state of the admin navigation link, which must be active,
* for browser Chrome/Chromium.
*/
@Test
public void navAdminChrome() {
System.setProperty("webdriver.chrome.driver",
"test/de/saxsys/treasurehunting/webdrivers/chromedriver.exe");
Helpers.running(Helpers.testServer(3333, Helpers.fakeApplication()),
ChromeDriver.class, new NavAdminCallbackComposite());
}
示例4: startSPGameSuccessIE
import play.test.Helpers; //导入方法依赖的package包/类
/**
* Tests successful start of a single player game.
*/
@Test
public void startSPGameSuccessIE() {
System.setProperty("webdriver.ie.driver",
"test/de/saxsys/treasurehunting/webdrivers/IEDriverServer.exe");
Helpers.running(Helpers.testServer(3333, Helpers.fakeApplication()),
InternetExplorerDriver.class, new StartSPGameSuccessCompositeCallback());
}
示例5: navAdminIE
import play.test.Helpers; //导入方法依赖的package包/类
/**
* Test method for running a successful login and the right presentation of
* the activity state of the admin navigation link, which must be active, for
* browser IE.
*/
@Test
public void navAdminIE() {
System.setProperty("webdriver.ie.driver",
"test/de/saxsys/treasurehunting/webdrivers/IEDriverServer.exe");
Helpers.running(Helpers.testServer(3333, Helpers.fakeApplication()),
InternetExplorerDriver.class, new NavAdminCallbackComposite());
}
示例6: startSPGameErrorChrome
import play.test.Helpers; //导入方法依赖的package包/类
/**
* Tests error prone start of a single player game.
*/
@Test
public void startSPGameErrorChrome() {
System.setProperty("webdriver.chrome.driver",
"test/de/saxsys/treasurehunting/webdrivers/chromedriver.exe");
Helpers.running(Helpers.testServer(3333, Helpers.fakeApplication()),
ChromeDriver.class, new StartSPGameErrorCompositeCallback());
}
示例7: startSPGameErrorIE
import play.test.Helpers; //导入方法依赖的package包/类
/**
* Tests error prone start of a single player game.
*/
@Test
public void startSPGameErrorIE() {
System.setProperty("webdriver.ie.driver",
"test/de/saxsys/treasurehunting/webdrivers/IEDriverServer.exe");
Helpers.running(Helpers.testServer(3333, Helpers.fakeApplication()),
InternetExplorerDriver.class, new StartSPGameErrorCompositeCallback());
}
示例8: index
import play.test.Helpers; //导入方法依赖的package包/类
/**
* This operation runs the authorization test.
*/
@Test
public void index() {
Helpers.running(Helpers.fakeApplication(), new Runnable() {
@Override
public void run() {
Result result = Helpers.callAction(routes.ref.GameController
.index());
assertThat(Helpers.redirectLocation(result)).isEqualTo("/");
}
});
}
示例9: singelplayer
import play.test.Helpers; //导入方法依赖的package包/类
/**
* This operation runs the authorization test.
*/
@Test
public void singelplayer() {
Helpers.running(Helpers.fakeApplication(), new Runnable() {
@Override
public void run() {
Result result = Helpers.callAction(routes.ref.GameController
.singleplayer(1));
assertThat(Helpers.redirectLocation(result)).isEqualTo("/");
}
});
}
示例10: langSelectDEIE
import play.test.Helpers; //导入方法依赖的package包/类
/**
* Test method for selecting the german language for browser IE.
*/
@Test
public void langSelectDEIE() {
System.setProperty("webdriver.ie.driver",
"test/de/saxsys/treasurehunting/webdrivers/IEDriverServer.exe");
Helpers.running(Helpers.testServer(3333, Helpers.fakeApplication()),
InternetExplorerDriver.class, new SelectLangDECallback());
}
示例11: visitorarena
import play.test.Helpers; //导入方法依赖的package包/类
/**
* This operation runs the authorization test.
*/
@Test
public void visitorarena() {
Helpers.running(Helpers.fakeApplication(), new Runnable() {
@Override
public void run() {
Result result = Helpers.callAction(routes.ref.GameController
.visitorarena());
assertThat(Helpers.redirectLocation(result)).isEqualTo("/");
}
});
}
示例12: startVAGame
import play.test.Helpers; //导入方法依赖的package包/类
/**
* This operation runs the authorization test.
*/
@Test
public void startVAGame() {
Helpers.running(Helpers.fakeApplication(), new Runnable() {
@Override
public void run() {
Result result = Helpers.callAction(routes.ref.GameController
.startVAGame());
assertThat(Helpers.redirectLocation(result)).isEqualTo("/");
}
});
}
示例13: index
import play.test.Helpers; //导入方法依赖的package包/类
/**
* This operation runs the authorization test.
*/
@Test
public void index() {
Helpers.running(Helpers.fakeApplication(), new Runnable() {
@Override
public void run() {
Result result = Helpers.callAction(routes.ref.AdminController.index());
assertThat(Helpers.redirectLocation(result)).isEqualTo("/");
}
});
}
示例14: langSelectENChrome
import play.test.Helpers; //导入方法依赖的package包/类
/**
* Test method for selecting the english language for browser
* Chrome/Chromium.
*/
@Test
public void langSelectENChrome() {
System.setProperty("webdriver.chrome.driver",
"test/de/saxsys/treasurehunting/webdrivers/chromedriver.exe");
Helpers.running(Helpers.testServer(3333, Helpers.fakeApplication()),
ChromeDriver.class, new SelectLangENCallback());
}
示例15: navUsernameIE
import play.test.Helpers; //导入方法依赖的package包/类
/**
* Test method for running a successful login for browser IE.
*/
@Test
public void navUsernameIE() {
System.setProperty("webdriver.ie.driver",
"test/de/saxsys/treasurehunting/webdrivers/IEDriverServer.exe");
Helpers.running(Helpers.testServer(3333, Helpers.fakeApplication()),
InternetExplorerDriver.class,
new NavUsernameCallbackComposite());
}