Search in sources :

Example 1 with BWMapMock

use of org.openbw.bwapi4j.BWMapMock 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 BWMapMock

use of org.openbw.bwapi4j.BWMapMock 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

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