public void Clear_ShouldDoNothing_When_SizeIsZero() { var sidePacket = new SidePacket(); sidePacket.Clear(); Assert.AreEqual(sidePacket.size, 0); }
public void Clear_ShouldDoNothing_When_SizeIsZero() { using (var sidePacket = new SidePacket()) { sidePacket.Clear(); Assert.AreEqual(0, sidePacket.size); } }
public void Clear_ShouldClearAllKeys_When_SizeIsNotZero() { var sidePacket = new SidePacket(); sidePacket.Emplace("flag", new BoolPacket(true)); sidePacket.Emplace("value", new FloatPacket(1.0f)); Assert.AreEqual(sidePacket.size, 2); sidePacket.Clear(); Assert.AreEqual(sidePacket.size, 0); }