Beispiel #1
0
        public void FailRemoveMapByIndexWhenFPGIsEmpty()
        {
            var pal = new PAL(this.GetAssetPath(SharedConstants.FILENAME_PAL_SPACE));
            var fpg = new FPG(pal);

            Assert.ThrowsException <InvalidOperationException>(() => fpg.Remove(0));
        }
Beispiel #2
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));
        }
Beispiel #3
0
        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));
        }
Beispiel #4
0
        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));
        }
Beispiel #5
0
        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));
        }
Beispiel #6
0
        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));
        }