Search in sources :

Example 1 with BWEM_DummyData

use of mockdata.BWEM_DummyData in project BWAPI4J by OpenBW.

the class MapTest method Compare_MiniTile_Altitudes_to_Original_Samples.

@Ignore
@Test
public void Compare_MiniTile_Altitudes_to_Original_Samples() throws Exception {
    for (final BWAPI_DummyData.MapHash mapHash : BWAPI_DummyData.MapHash.values()) {
        logger.debug("Compare_MiniTile_Altitudes_to_Original_Samples: " + mapHash.getMapName() + ": " + mapHash.getMapHash());
        final BWMap bwMapMock = new BWMapMock(mapHash.getMapHash(), BWAPI_DummyData.DataSetBwapiVersion.BWAPI_420.toString());
        final BWEM_DummyData bwemDummyData = new BWEM_DummyData(mapHash.getMapHash(), BWAPI_DummyData.DataSetBwapiVersion.BWAPI_420.toString(), BWEM_DummyData.DataSetBwemVersion.BWEM_141.toString());
        this.bwemMap = new MapInitializerImpl(bwMapMock, null, new ArrayList<>(), ((BWMapMock) bwMapMock).getDummyData().getMineralPatches(), ((BWMapMock) bwMapMock).getDummyData().getVespeneGeysers(), new ArrayList<>());
        ((MapInitializer) this.bwemMap).initialize(true);
        assertEquals_MiniTileAltitudes(this.bwemMap.getData(), bwemDummyData);
    }
}
Also used : BWAPI_DummyData(mockdata.BWAPI_DummyData) ArrayList(java.util.ArrayList) BWEM_DummyData(mockdata.BWEM_DummyData) BWMap(org.openbw.bwapi4j.BWMap) BWMapMock(org.openbw.bwapi4j.BWMapMock) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 2 with BWEM_DummyData

use of mockdata.BWEM_DummyData in project BWAPI4J by OpenBW.

the class MapTest method Compare_MiniTile_Altitudes_to_Original_Samples_LIVE.

@Ignore
@Test
public void Compare_MiniTile_Altitudes_to_Original_Samples_LIVE() throws AssertionError, IOException {
    this.bw = new BW(this);
    this.bw.startGame();
    final BWEM_DummyData bwemDummyData = new BWEM_DummyData(this.bw.getBWMap().mapHash(), BWAPI_DummyData.DataSetBwapiVersion.BWAPI_420.toString(), BWEM_DummyData.DataSetBwemVersion.BWEM_141.toString());
    assertEquals_MiniTileAltitudes(this.bwemMap.getData(), bwemDummyData);
}
Also used : BW(org.openbw.bwapi4j.BW) BWEM_DummyData(mockdata.BWEM_DummyData) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 3 with BWEM_DummyData

use of mockdata.BWEM_DummyData in project BWAPI4J by OpenBW.

the class MapTest method Compare_ChokePoint_Centers_to_Original_Samples_LIVE.

@Ignore
@Test
public void Compare_ChokePoint_Centers_to_Original_Samples_LIVE() throws URISyntaxException, IOException {
    this.bw = new BW(this);
    this.bw.startGame();
    final BWEM_DummyData bwemDummyData = new BWEM_DummyData(this.bw.getBWMap().mapHash(), BWAPI_DummyData.DataSetBwapiVersion.BWAPI_420.toString(), BWEM_DummyData.DataSetBwemVersion.BWEM_141.toString());
    assert_ChokePoints(bwemDummyData.getChokePointCenters(), ((MapImpl) this.bwemMap).getGraph().getChokePoints());
}
Also used : BW(org.openbw.bwapi4j.BW) BWEM_DummyData(mockdata.BWEM_DummyData) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 4 with BWEM_DummyData

use of mockdata.BWEM_DummyData in project BWAPI4J by OpenBW.

the class MapTest method Compare_ChokePoint_Centers_to_Original_Samples.

// TODO: This test will fail until the mock can handle special buildings. The LIVE version should pass, though.
@Ignore
@Test
public void Compare_ChokePoint_Centers_to_Original_Samples() throws Exception {
    for (final BWAPI_DummyData.MapHash mapHash : BWAPI_DummyData.MapHash.values()) {
        logger.debug("Compare_ChokePoint_Centers_to_Original_Samples: " + mapHash.getMapName() + ": " + mapHash.getMapHash());
        final BWMap bwMapMock = new BWMapMock(mapHash.getMapHash(), BWAPI_DummyData.DataSetBwapiVersion.BWAPI_420.toString());
        final BWEM_DummyData bwemDummyData = new BWEM_DummyData(mapHash.getMapHash(), BWAPI_DummyData.DataSetBwapiVersion.BWAPI_420.toString(), BWEM_DummyData.DataSetBwemVersion.BWEM_141.toString());
        this.bwemMap = new MapInitializerImpl(bwMapMock, null, new ArrayList<>(), ((BWMapMock) bwMapMock).getDummyData().getMineralPatches(), ((BWMapMock) bwMapMock).getDummyData().getVespeneGeysers(), new ArrayList<>());
        ((MapInitializer) this.bwemMap).initialize(true);
        assert_ChokePoints(bwemDummyData.getChokePointCenters(), ((MapImpl) this.bwemMap).getGraph().getChokePoints());
    }
}
Also used : BWAPI_DummyData(mockdata.BWAPI_DummyData) ArrayList(java.util.ArrayList) BWEM_DummyData(mockdata.BWEM_DummyData) BWMap(org.openbw.bwapi4j.BWMap) BWMapMock(org.openbw.bwapi4j.BWMapMock) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

BWEM_DummyData (mockdata.BWEM_DummyData)4 Ignore (org.junit.Ignore)4 Test (org.junit.Test)4 ArrayList (java.util.ArrayList)2 BWAPI_DummyData (mockdata.BWAPI_DummyData)2 BW (org.openbw.bwapi4j.BW)2 BWMap (org.openbw.bwapi4j.BWMap)2 BWMapMock (org.openbw.bwapi4j.BWMapMock)2