|
Lines 14-19
Link Here
|
| 14 |
import static org.eclipse.rap.rwt.internal.service.ContextProvider.getApplicationContext; |
14 |
import static org.eclipse.rap.rwt.internal.service.ContextProvider.getApplicationContext; |
| 15 |
import static org.junit.Assert.assertEquals; |
15 |
import static org.junit.Assert.assertEquals; |
| 16 |
import static org.junit.Assert.assertFalse; |
16 |
import static org.junit.Assert.assertFalse; |
|
|
17 |
import static org.junit.Assert.assertNotNull; |
| 17 |
import static org.junit.Assert.assertNotSame; |
18 |
import static org.junit.Assert.assertNotSame; |
| 18 |
import static org.junit.Assert.assertNull; |
19 |
import static org.junit.Assert.assertNull; |
| 19 |
import static org.junit.Assert.assertSame; |
20 |
import static org.junit.Assert.assertSame; |
|
Lines 137-142
Link Here
|
| 137 |
} |
138 |
} |
| 138 |
|
139 |
|
| 139 |
@Test |
140 |
@Test |
|
|
141 |
public void testShutdownUISession_returnsValidJson() throws IOException { |
| 142 |
LifeCycleServiceHandler.markSessionStarted(); |
| 143 |
simulateShutdownUiRequest(); |
| 144 |
service( handler ); |
| 145 |
|
| 146 |
TestResponse response = getResponse(); |
| 147 |
JsonObject message = JsonObject.readFrom( response.getContent() ); |
| 148 |
assertEquals( "application/json; charset=UTF-8", response.getHeader( "Content-Type" ) ); |
| 149 |
assertNotNull( message.get( ClientMessage.PROP_HEAD ) ); |
| 150 |
assertNotNull( message.get( ClientMessage.PROP_OPERATIONS ) ); |
| 151 |
} |
| 152 |
|
| 153 |
@Test |
| 140 |
public void testShutdownUISession_RemoveUISessionFromHttpSession() throws IOException { |
154 |
public void testShutdownUISession_RemoveUISessionFromHttpSession() throws IOException { |
| 141 |
UISession uiSession = ContextProvider.getUISession(); |
155 |
UISession uiSession = ContextProvider.getUISession(); |
| 142 |
HttpSession httpSession = uiSession.getHttpSession(); |
156 |
HttpSession httpSession = uiSession.getHttpSession(); |