public void AddLumpAtPositionTest() { var wad = new Wad("dummy", 1, "filename.wad"); for (int i = 0; i < 5; i++) { Lump lump = new Lump(); lump.Name = $"NEWLUMP{i}"; lump.Position = i; wad.AddLump(lump); } Assert.AreEqual(5, wad.LumpCount); Lump insertedLump = new Lump(); insertedLump.Position = 100; insertedLump.Name = "INSERED_LUMP"; wad.AddLumpAtPosition(insertedLump, 3); Assert.AreEqual(6, wad.LumpCount); Assert.AreEqual(insertedLump, wad.GetLumpAtPosition(3)); Assert.AreEqual(3, insertedLump.Position); Lump lastLump = wad.GetLumpAtPosition(wad.LumpCount - 1); Assert.AreEqual(5, lastLump.Position); Assert.AreEqual("NEWLUMP4", lastLump.Name); }