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


Java Helpers.start方法代码示例

本文整理汇总了Java中play.test.Helpers.start方法的典型用法代码示例。如果您正苦于以下问题:Java Helpers.start方法的具体用法?Java Helpers.start怎么用?Java Helpers.start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在play.test.Helpers的用法示例。


在下文中一共展示了Helpers.start方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
  //createtableList();
  Util.checkCassandraDbConnections(JsonKey.SUNBIRD_PLUGIN);
  entityName = "announcement";
  app = Helpers.fakeApplication();
  Helpers.start(app);
  headerMap = new HashMap<String, String[]>();
  headerMap.put(HeaderParam.X_Consumer_ID.getName(), new String[]{"Service test consumer"});
  headerMap.put(HeaderParam.X_Device_ID.getName(), new String[]{"Some Device Id"});
  headerMap.put(HeaderParam.X_Authenticated_Userid.getName(), new String[]{"Authenticated user id"});
  headerMap.put(JsonKey.MESSAGE_ID, new String[]{"Unique Message id"});

  system = ActorSystem.create("system");
  ActorRef subject = system.actorOf(props);
  BaseController.setActorRef(subject);
}
 
开发者ID:project-sunbird,项目名称:sunbird-lms-service,代码行数:18,代码来源:DbOperationControllerTest.java

示例2: setUp

import play.test.Helpers; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    // Unfortunately we need to restart for each test because there is some weird issue with question id sequence.
    // Ebean allocates us duplicate PKs eventually unless server is recreated in between. This is either a bug with
    // Ebean (batching) or an issue with our question entity JPA mappings.
    app = Helpers.fakeApplication();
    Helpers.start(app);
    cleanDB();
    Database db = getDB();
    Evolutions.applyEvolutions(db);
    cleanEvolvedTables(db);
    db.shutdown();

    addTestData();

    onBeforeLogin();

    Method testMethod = getClass().getDeclaredMethod(currentTest.getMethodName());
    if (testMethod.isAnnotationPresent(RunAsStudent.class)) {
        loginAsStudent();
    } else if (testMethod.isAnnotationPresent(RunAsTeacher.class)) {
        loginAsTeacher();
    } else if (testMethod.isAnnotationPresent(RunAsAdmin.class)) {
        loginAsAdmin();
    }
}
 
开发者ID:CSCfi,项目名称:exam,代码行数:27,代码来源:IntegrationTestCase.java

示例3: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
    app = Helpers.fakeApplication();
    Helpers.start(app);
       headerMap = new HashMap<String, String[]>();
       headerMap.put(HeaderParam.X_Consumer_ID.getName(), new String[]{"Service test consumer"});
       headerMap.put(HeaderParam.X_Device_ID.getName(), new String[]{"Some Device Id"});
       headerMap.put(HeaderParam.X_Authenticated_Userid.getName(), new String[]{"Authenticated user id"});
       headerMap.put(JsonKey.MESSAGE_ID, new String[]{"Unique Message id"});
}
 
开发者ID:project-sunbird,项目名称:sunbird-lms-service,代码行数:11,代码来源:IntegrationTest.java

示例4: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
  app = Helpers.fakeApplication();
  Helpers.start(app);
  headerMap = new HashMap<String, String[]>();
  headerMap.put(HeaderParam.X_Consumer_ID.getName(), new String[]{"Service test consumer"});
  headerMap.put(HeaderParam.X_Device_ID.getName(), new String[]{"Some Device Id"});
  headerMap.put(HeaderParam.X_Authenticated_Userid.getName(), new String[]{"Authenticated user id"});
  headerMap.put(JsonKey.MESSAGE_ID, new String[]{"Unique Message id"});

  system = ActorSystem.create("system");
  ActorRef subject = system.actorOf(props);
  BaseController.setActorRef(subject);
}
 
开发者ID:project-sunbird,项目名称:sunbird-lms-service,代码行数:15,代码来源:OrganisationControllerTest.java

示例5: start

import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void start() {
    app = Helpers.fakeApplication();

    Helpers.start(app);
    transactionTestService = TestUtils.instanceOf(app, TransactionTestService.class);
}
 
开发者ID:XenonAbe,项目名称:dbflute-play-guice-java-example,代码行数:8,代码来源:TransactionTest.java

示例6: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
	
	System.out.println("=========================================================");
	System.out.println("                -------------------------");
	System.out.println("                    APPLICATION TEST");
	System.out.println("                -------------------------");
	
    app = Helpers.fakeApplication();
    Helpers.start(app);
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:12,代码来源:ApplicationTest.java

示例7: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {

	Config additionalConfig = ConfigFactory.parseFile(new File("conf/testes.conf"));
	additionalConfigurations = new Configuration(additionalConfig);
	System.out.println(additionalConfigurations.asMap());

	app = Helpers.fakeApplication(additionalConfigurations.asMap());

	Helpers.start(app);
}
 
开发者ID:boaglio,项目名称:play2-casadocodigo,代码行数:12,代码来源:DatabaseTest.java

示例8: startFakeApplication

import play.test.Helpers; //导入方法依赖的package包/类
/**
 * Initialisiert eine {@link FakeApplication} mit InMemory-DB.
 */
@BeforeClass
public static void startFakeApplication() {

	fakeApplication = Helpers.fakeApplication(Helpers.inMemoryDatabase());
	Helpers.start(fakeApplication);
}
 
开发者ID:stefanil,项目名称:play2-prototypen,代码行数:10,代码来源:BaseModelTest.java

示例9: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@Before
public void startApp() throws Exception {
  app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
  Helpers.start(app);
}
 
开发者ID:linkedin,项目名称:dr-elephant,代码行数:6,代码来源:InfoExtractorTest.java

示例10: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
  app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
  Helpers.start(app);
}
 
开发者ID:linkedin,项目名称:dr-elephant,代码行数:6,代码来源:ApplicationTest.java

示例11: setup

import play.test.Helpers; //导入方法依赖的package包/类
@Before
public void setup() {
  app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
  Helpers.start(app);
}
 
开发者ID:Coderaio,项目名称:sample-play-angular-app,代码行数:6,代码来源:UserTest.java

示例12: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@Before
public void startApp() {
  app = Helpers.fakeApplication(inMemoryDatabase(), new Global());
  Helpers.start(app);
}
 
开发者ID:Coderaio,项目名称:sample-play-angular-app,代码行数:6,代码来源:BaseTest.java

示例13: before

import play.test.Helpers; //导入方法依赖的package包/类
@Before
public void before() {
  Map<String, String> inMemoryDatabase = Helpers.inMemoryDatabase("h2");
  app = Helpers.fakeApplication(inMemoryDatabase);
  Helpers.start(app);
}
 
开发者ID:metno,项目名称:poseidon-rest,代码行数:7,代码来源:InMemoryDbTest.java

示例14: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
    app = Helpers.fakeApplication();
    Helpers.start(app);
}
 
开发者ID:socia-platform,项目名称:htwplus,代码行数:6,代码来源:FakeApplicationTest.java

示例15: startApp

import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
  app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
  Helpers.start(app);
  Observation.deleteAll();
}
 
开发者ID:Arquisoft,项目名称:ObservaTerra42,代码行数:7,代码来源:ExcelReaderTest.java


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