Search in sources :

Example 1 with JUnitClientSession

use of org.eclipse.scout.rt.testing.client.runner.ClientTestRunnerDifferentSubjectTest.JUnitClientSession 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);
}
Also used : ISession(org.eclipse.scout.rt.shared.ISession) JUnitClientSession(org.eclipse.scout.rt.testing.client.runner.ClientTestRunnerDifferentSubjectTest.JUnitClientSession) RunWithSubject(org.eclipse.scout.rt.testing.platform.runner.RunWithSubject) Test(org.junit.Test)

Example 2 with JUnitClientSession

use of org.eclipse.scout.rt.testing.client.runner.ClientTestRunnerDifferentSubjectTest.JUnitClientSession in project scout.rt by eclipse.

the class ClientTestRunnerDifferentSubjectTest method test1.

@Test
public void test1() {
    ISession clientSession = IClientSession.CURRENT.get();
    assertTrue(clientSession instanceof JUnitClientSession);
    assertEquals("anna", getCurrentUser());
    m_clientSessions.add(clientSession);
}
Also used : ISession(org.eclipse.scout.rt.shared.ISession) JUnitClientSession(org.eclipse.scout.rt.testing.client.runner.ClientTestRunnerDifferentSubjectTest.JUnitClientSession) Test(org.junit.Test)

Example 3 with JUnitClientSession

use of org.eclipse.scout.rt.testing.client.runner.ClientTestRunnerDifferentSubjectTest.JUnitClientSession in project scout.rt by eclipse.

the class ClientTestRunnerDifferentSubjectTest method afterClass.

@AfterClass
public static void afterClass() {
    ISession clientSession = IClientSession.CURRENT.get();
    assertTrue(clientSession instanceof JUnitClientSession);
    assertEquals("anna", getCurrentUser());
    m_clientSessions.add(clientSession);
    assertEquals(2, m_clientSessions.size());
}
Also used : ISession(org.eclipse.scout.rt.shared.ISession) JUnitClientSession(org.eclipse.scout.rt.testing.client.runner.ClientTestRunnerDifferentSubjectTest.JUnitClientSession) AfterClass(org.junit.AfterClass)

Example 4 with JUnitClientSession

use of org.eclipse.scout.rt.testing.client.runner.ClientTestRunnerDifferentSubjectTest.JUnitClientSession in project scout.rt by eclipse.

the class ClientTestRunnerDifferentSubjectTest method beforeClass.

@BeforeClass
public static void beforeClass() {
    m_clientSessions = new HashSet<>();
    ISession clientSession = IClientSession.CURRENT.get();
    assertTrue(clientSession instanceof JUnitClientSession);
    assertEquals("anna", getCurrentUser());
    m_clientSessions.add(clientSession);
}
Also used : ISession(org.eclipse.scout.rt.shared.ISession) JUnitClientSession(org.eclipse.scout.rt.testing.client.runner.ClientTestRunnerDifferentSubjectTest.JUnitClientSession) BeforeClass(org.junit.BeforeClass)

Aggregations

ISession (org.eclipse.scout.rt.shared.ISession)4 JUnitClientSession (org.eclipse.scout.rt.testing.client.runner.ClientTestRunnerDifferentSubjectTest.JUnitClientSession)4 Test (org.junit.Test)2 RunWithSubject (org.eclipse.scout.rt.testing.platform.runner.RunWithSubject)1 AfterClass (org.junit.AfterClass)1 BeforeClass (org.junit.BeforeClass)1