use of org.eclipse.scout.rt.testing.platform.runner.RunWithSubject in project scout.rt by eclipse.
the class ClientTestRunnerDifferentSubjectTest method test2.
@Test
@RunWithSubject("john")
public void test2() {
ISession clientSession = IClientSession.CURRENT.get();
assertTrue(clientSession instanceof JUnitClientSession);
assertEquals("john", getCurrentUser());
m_clientSessions.add(clientSession);
}
use of org.eclipse.scout.rt.testing.platform.runner.RunWithSubject in project scout.rt by eclipse.
the class ServerTestRunnerDifferentSubjectTest method test2.
@Test
@RunWithSubject("john")
public void test2() {
ISession serverSession = IServerSession.CURRENT.get();
assertTrue(serverSession instanceof JUnitServerSession);
assertEquals("john", serverSession.getUserId());
m_serverSessions.add(serverSession);
ITransaction transaction = ITransaction.CURRENT.get();
assertNotNull(transaction);
m_transactions.add(transaction);
}
Aggregations