public void FailRemoveMapByIndexWhenFPGIsEmpty() { var pal = new PAL(this.GetAssetPath(SharedConstants.FILENAME_PAL_SPACE)); var fpg = new FPG(pal); Assert.ThrowsException <InvalidOperationException>(() => fpg.Remove(0)); }
public void FailRemoveMapByGraphId() { const int GRAPH_ID = 333; var fpg = new FPG(this.GetAssetPath(SharedConstants.FILENAME_FPG_TEST)); Assert.ThrowsException <ArgumentException>(() => fpg.Remove(GRAPH_ID)); }
public void FailRemoveMapByGraphIdWhenFPGIsEmpty() { const int GRAPH_ID = 333; var pal = new PAL(this.GetAssetPath(SharedConstants.FILENAME_PAL_SPACE)); var fpg = new FPG(pal); Assert.ThrowsException <InvalidOperationException>(() => fpg.Remove(GRAPH_ID)); }
public void RemoveMapByGraphId() { const int GRAPH_ID = 100; // PLAYER.MAP, index 1. var fpg = new FPG(this.GetAssetPath(SharedConstants.FILENAME_FPG_TEST)); fpg.Remove(GRAPH_ID); Assert.IsFalse(fpg.Contains(GRAPH_ID)); }
public void FailRemoveMapByInstance() { var pal = new PAL(this.GetAssetPath(SharedConstants.FILENAME_PAL_SPACE)); var fpg = new FPG(pal); var a = new MAP(this.GetAssetPath(SharedConstants.FILENAME_IMG_PLAYER_MAP)); var b = MAP.FromImage(this.GetAssetPath(SharedConstants.FILENAME_IMG_PLAYER_BMP)); fpg.Add(b); Assert.ThrowsException <ArgumentException>(() => fpg.Remove(a)); }
public void RemoveMapByInstance() { var pal = new PAL(this.GetAssetPath(SharedConstants.FILENAME_PAL_SPACE)); var map = new MAP(this.GetAssetPath(SharedConstants.FILENAME_IMG_PLAYER_MAP)); var fpg = new FPG(pal); fpg.Add(map); Assert.IsTrue(fpg.Contains(map)); fpg.Remove(map); Assert.IsFalse(fpg.Contains(map)); }