public virtual void TestContains() { RevFlag flag1 = rw.NewFlag("flag_1"); RevFlag flag2 = rw.NewFlag("flag_2"); RevFlagSet set = new RevFlagSet(); set.AddItem(flag1); NUnit.Framework.Assert.IsTrue(set.Contains(flag1)); NUnit.Framework.Assert.IsFalse(set.Contains(flag2)); NUnit.Framework.Assert.IsFalse(set.Contains("bob")); }
public virtual void TestRemove() { RevFlag flag1 = rw.NewFlag("flag_1"); RevFlag flag2 = rw.NewFlag("flag_2"); RevFlagSet set = new RevFlagSet(); NUnit.Framework.Assert.IsTrue(set.AddItem(flag1)); NUnit.Framework.Assert.IsTrue(set.AddItem(flag2)); NUnit.Framework.Assert.IsTrue(set.Remove(flag1)); NUnit.Framework.Assert.IsFalse(set.Remove(flag1)); NUnit.Framework.Assert.AreEqual(flag2.mask, set.mask); NUnit.Framework.Assert.IsFalse(set.Contains(flag1)); }