Beispiel #1
0
        public void testContainsAll()
        {
            RevFlag flag1 = rw.newFlag("flag_1");
            RevFlag flag2 = rw.newFlag("flag_2");
            var     set1  = new RevFlagSet();

            Assert.IsTrue(set1.Add(flag1));
            Assert.IsTrue(set1.Add(flag2));

            Assert.IsTrue(set1.ContainsAll(set1));
            Assert.IsTrue(set1.ContainsAll(new[] { flag1, flag2 }));

            var set2 = new RevFlagSet {
                rw.newFlag("flag_3")
            };

            Assert.IsFalse(set1.ContainsAll(set2));
        }
Beispiel #2
0
		public virtual void TestContainsAll()
		{
			RevFlag flag1 = rw.NewFlag("flag_1");
			RevFlag flag2 = rw.NewFlag("flag_2");
			RevFlagSet set1 = new RevFlagSet();
			NUnit.Framework.Assert.IsTrue(set1.AddItem(flag1));
			NUnit.Framework.Assert.IsTrue(set1.AddItem(flag2));
			NUnit.Framework.Assert.IsTrue(set1.ContainsAll(set1));
			NUnit.Framework.Assert.IsTrue(set1.ContainsAll(Arrays.AsList(new RevFlag[] { flag1
				, flag2 })));
			RevFlagSet set2 = new RevFlagSet();
			set2.AddItem(rw.NewFlag("flag_3"));
			NUnit.Framework.Assert.IsFalse(set1.ContainsAll(set2));
		}
Beispiel #3
0
        public void testContainsAll()
        {
            RevFlag flag1 = rw.newFlag("flag_1");
            RevFlag flag2 = rw.newFlag("flag_2");
            var set1 = new RevFlagSet();
            Assert.IsTrue(set1.Add(flag1));
            Assert.IsTrue(set1.Add(flag2));

            Assert.IsTrue(set1.ContainsAll(set1));
            Assert.IsTrue(set1.ContainsAll(new[] { flag1, flag2 }));

            var set2 = new RevFlagSet { rw.newFlag("flag_3") };
            Assert.IsFalse(set1.ContainsAll(set2));
        }