当前位置: 首页>>代码示例>>Java>>正文


Java Helpers.running方法代码示例

本文整理汇总了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());
  });
}
 
开发者ID:edulify,项目名称:play-geolocation-module.edulify.com,代码行数:13,代码来源:GeolocationCacheTest.java

示例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());
  });
}
 
开发者ID:edulify,项目名称:play-geolocation-module.edulify.com,代码行数:13,代码来源:GeolocationCacheTest.java

示例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());
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:13,代码来源:CommonBrowserNavigationTest.java

示例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());
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:11,代码来源:IndexPageTest.java

示例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());
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:13,代码来源:CommonBrowserNavigationTest.java

示例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());
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:11,代码来源:IndexPageTest.java

示例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());
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:11,代码来源:IndexPageTest.java

示例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("/");
		}
	});
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:15,代码来源:GameControllerAuthTest.java

示例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("/");
		}
	});
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:15,代码来源:GameControllerAuthTest.java

示例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());
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:11,代码来源:CommonBrowserLangSelectTest.java

示例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("/");
		}
	});
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:15,代码来源:GameControllerAuthTest.java

示例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("/");
		}
	});
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:15,代码来源:GameControllerAuthTest.java

示例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("/");
           }
	});
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:14,代码来源:AdminControllerAuthTest.java

示例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());
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:12,代码来源:CommonBrowserLangSelectTest.java

示例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());
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:12,代码来源:CommonBrowserNavigationTest.java


注:本文中的play.test.Helpers.running方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。