本文整理汇总了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);
}
示例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();
}
}
示例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"});
}
示例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);
}
示例5: start
import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void start() {
app = Helpers.fakeApplication();
Helpers.start(app);
transactionTestService = TestUtils.instanceOf(app, TransactionTestService.class);
}
示例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);
}
示例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);
}
示例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);
}
示例9: startApp
import play.test.Helpers; //导入方法依赖的package包/类
@Before
public void startApp() throws Exception {
app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
Helpers.start(app);
}
示例10: startApp
import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
Helpers.start(app);
}
示例11: setup
import play.test.Helpers; //导入方法依赖的package包/类
@Before
public void setup() {
app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
Helpers.start(app);
}
示例12: startApp
import play.test.Helpers; //导入方法依赖的package包/类
@Before
public void startApp() {
app = Helpers.fakeApplication(inMemoryDatabase(), new Global());
Helpers.start(app);
}
示例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);
}
示例14: startApp
import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
app = Helpers.fakeApplication();
Helpers.start(app);
}
示例15: startApp
import play.test.Helpers; //导入方法依赖的package包/类
@BeforeClass
public static void startApp() {
app = Helpers.fakeApplication(Helpers.inMemoryDatabase());
Helpers.start(app);
Observation.deleteAll();
}