use of games.strategy.util.Version in project triplea by triplea-game.
the class DownloadFileDescriptionTest method testGetMapName.
@Test
public void testGetMapName() {
final String mapName = "abc";
final DownloadFileDescription testObj = new DownloadFileDescription("", "", mapName, new Version(0, 0), DownloadFileDescription.DownloadType.MAP, DownloadFileDescription.MapCategory.EXPERIMENTAL);
assertThat(testObj.getMapName(), is(mapName));
}
use of games.strategy.util.Version in project triplea by triplea-game.
the class MapDownloadListSortTest method createDownload.
private static DownloadFileDescription createDownload(final String mapName, final String url) {
final String description = "fake";
final Version version = new Version("1");
return new DownloadFileDescription(url, description, mapName, version, DownloadFileDescription.DownloadType.MAP, DownloadFileDescription.MapCategory.EXPERIMENTAL);
}
use of games.strategy.util.Version in project triplea by triplea-game.
the class LobbyPropertyFileParserTest method parseWithSimpleCase.
/**
* Just one set of values in a config file with no verson. The props we return should be a pretty
* straight forward 1:1
*/
@Test
public void parseWithSimpleCase() throws Exception {
final TestProps testProps = new TestProps();
testProps.host = TestData.host;
testProps.port = TestData.port;
testProps.errorMessage = TestData.errorMessage;
testProps.message = TestData.message;
testProps.version = TestData.clientCurrentVersion;
final File testFile = createTempFile(testProps);
final LobbyServerProperties result = LobbyPropertyFileParser.parse(testFile, new Version(TestData.clientCurrentVersion));
assertThat(result.host, is(TestData.host));
assertThat(result.port, is(Integer.valueOf(TestData.port)));
assertThat(result.serverMessage, is(TestData.message));
assertThat(result.serverErrorMessage, is(TestData.errorMessage));
}
use of games.strategy.util.Version in project triplea by triplea-game.
the class GameSelectorModelTest method prepareMockGameDataExpectations.
private void prepareMockGameDataExpectations() {
when(mockGameData.getGameVersion()).thenReturn(new Version(fakeGameVersion));
when(mockGameData.getSequence()).thenReturn(mockSequence);
when(mockSequence.getRound()).thenReturn(Integer.valueOf(fakeGameRound));
when(mockGameData.getGameName()).thenReturn(fakeGameName);
}
use of games.strategy.util.Version in project triplea by triplea-game.
the class DownloadFileDescriptionTest method mapInstallLocationTest.
private static void mapInstallLocationTest(final String inputUrl, final String mapName, final File expected) {
final DownloadFileDescription testObj = new DownloadFileDescription(inputUrl, "", mapName, new Version(0, 0), DownloadFileDescription.DownloadType.MAP, DownloadFileDescription.MapCategory.EXPERIMENTAL);
assertThat(testObj.getInstallLocation().getAbsolutePath(), is(expected.getAbsolutePath()));
}
Aggregations