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