Search in sources :

Example 1 with ResourceList

use of games.strategy.engine.data.ResourceList in project triplea by triplea-game.

the class ParserTest method testResourcesAdded.

@Test
public void testResourcesAdded() {
    final ResourceList resources = gameData.getResourceList();
    assertEquals(2, resources.size());
}
Also used : ResourceList(games.strategy.engine.data.ResourceList) Test(org.junit.jupiter.api.Test)

Example 2 with ResourceList

use of games.strategy.engine.data.ResourceList in project triplea by triplea-game.

the class ResourceCollectionUtilsTest method givenGameResources.

private void givenGameResources(final Resource... resources) {
    final ResourceList gameResources = mock(ResourceList.class);
    doReturn(null).when(gameResources).getResource(anyString());
    for (final Resource resource : resources) {
        doReturn(resource).when(gameResources).getResource(resource.getName());
    }
    when(data.getResourceList()).thenReturn(gameResources);
}
Also used : ResourceList(games.strategy.engine.data.ResourceList) Resource(games.strategy.engine.data.Resource)

Example 3 with ResourceList

use of games.strategy.engine.data.ResourceList in project triplea by triplea-game.

the class UserActionPanelTest method givenGameHasPuResource.

private void givenGameHasPuResource() {
    final ResourceList gameResources = mock(ResourceList.class);
    when(gameResources.getResource(pus.getName())).thenReturn(pus);
    when(data.getResourceList()).thenReturn(gameResources);
}
Also used : ResourceList(games.strategy.engine.data.ResourceList)

Aggregations

ResourceList (games.strategy.engine.data.ResourceList)3 Resource (games.strategy.engine.data.Resource)1 Test (org.junit.jupiter.api.Test)1