public void GetLumpByNameTest()
        {
            var lump = _wad.GetLumpByName("SB_SIGIL4");

            Assert.IsNotNull(lump);
            Assert.AreEqual("SB_SIGIL4", lump.Name);
            Assert.AreEqual(136, lump.Size);
            Assert.AreEqual(83, lump.Position);
            Assert.AreEqual(0x42, lump.LumpType);
            Assert.IsFalse(lump.IsCompressed);
            Assert.IsFalse(lump.IsCorrupt);

            Assert.AreEqual(0x08, lump.Bytes[0]);
            Assert.AreEqual(0x11, lump.Bytes[135]);
            Assert.AreEqual(0xAE, lump.Bytes[38]);
        }
        public void GetLumpByNameTest()
        {
            var lump = _wad.GetLumpByName("LAMBDA");

            Assert.IsNotNull(lump);
            Assert.AreEqual("LAMBDA", lump.Name);
            Assert.AreEqual(6252, lump.Size);
            Assert.AreEqual(7, lump.Position);
            Assert.AreEqual(0x43, lump.LumpType);
            Assert.IsFalse(lump.IsCompressed);
            Assert.IsFalse(lump.IsCorrupt);

            Assert.AreEqual(0x6C, lump.Bytes[0]);
            Assert.AreEqual(0x00, lump.Bytes[6251]);
            Assert.AreEqual(0x29, lump.Bytes[5607]);
        }
Esempio n. 3
0
        public void GetLumpByNameTest()
        {
            var lump = _wad.GetLumpByName("ENDOOM");

            Assert.IsNotNull(lump);
            Assert.AreEqual("ENDOOM", lump.Name);
            Assert.AreEqual(4000, lump.Size);
            Assert.AreEqual(2, lump.Position);
            Assert.AreEqual(-1, lump.LumpType);
            Assert.IsFalse(lump.IsCompressed);
            Assert.IsFalse(lump.IsCorrupt);

            Assert.AreEqual(0x20, lump.Bytes[0]);
            Assert.AreEqual(0x07, lump.Bytes[3999]);
            Assert.AreEqual(0x4F, lump.Bytes[3381]);
        }
Esempio n. 4
0
        public void AddLumpTest()
        {
            var wad = new Wad("dummy", 1, "filename.wad");

            Lump lump = new Lump(); {
                lump.Name = "NEWLUMP";
            }

            wad.AddLump(lump);

            Assert.AreEqual(1, wad.LumpCount);
            Assert.AreEqual(lump, wad.GetLumpByName("NEWLUMP"));
        }