use of com.faforever.client.remote.domain.GameAccess in project downlords-faf-client by FAForever.
the class GameAccessTypeAdapterTest method testReadNull.
@Test
public void testReadNull() throws Exception {
JsonReader in = mock(JsonReader.class);
when(in.nextString()).thenReturn(null);
GameAccess gameAccess = instance.read(in);
Assert.assertNull(gameAccess);
}
use of com.faforever.client.remote.domain.GameAccess in project downlords-faf-client by FAForever.
the class GameAccessTypeAdapterTest method testRead.
@Test
public void testRead() throws Exception {
JsonReader in = mock(JsonReader.class);
when(in.nextString()).thenReturn(GameAccess.PASSWORD.getString());
GameAccess gameAccess = instance.read(in);
assertEquals(GameAccess.PASSWORD, gameAccess);
}
use of com.faforever.client.remote.domain.GameAccess in project downlords-faf-client by FAForever.
the class GameAccessTypeAdapterTest method testReadGibberish.
@Test
public void testReadGibberish() throws Exception {
JsonReader in = mock(JsonReader.class);
when(in.nextString()).thenReturn("gibberish");
GameAccess gameAccess = instance.read(in);
Assert.assertNull(gameAccess);
}
Aggregations