public void ListOfLists() { var changing = new NbtList { new NbtList { new NbtByte(3) }, new NbtList { }, }; var template = new NbtList { new NbtList { new NbtByte(10) }, new NbtList { new NbtByte(10) }, new NbtList { new NbtByte(10) }, }; var compound = changing[0]; var value = changing[0][0]; changing.SetEqualTo(template); AssertIdentical(changing, template); Assert.AreEqual(compound, changing[0]); Assert.AreEqual(value, changing[0][0]); }
public void ShorterList() { var changing = new NbtList { new NbtShort(1), new NbtShort(2), new NbtShort(3), new NbtShort(4), new NbtShort(5), }; var template = new NbtList { new NbtShort(1), new NbtShort(2), }; var tags = changing.Take(2).ToList(); changing.SetEqualTo(template); var new_tags = changing.ToList(); Assert.IsTrue(tags.SequenceEqual(new_tags)); AssertIdentical(changing, template); }