Esempio n. 1
0
        public void AndCreatesAndOperatorWithSubFilters()
        {
            PluginFilter original = PluginFilter.Create.IsNamed("original");
            PluginFilter added    = PluginFilter.Create.HasInfo("added");
            PluginFilter tested   = original.And(added);

            Assert.AreEqual(PluginFilter.FilterOperation.And, tested.Operation);
            Assert.IsNull(tested.OperationData);
            Assert.AreEqual(2, tested.SubFilters.Length);
            Assert.IsTrue(tested.SubFilters.Contains(original));
            Assert.IsTrue(tested.SubFilters.Contains(added));
        }
Esempio n. 2
0
        public void AndRequiresArgument()
        {
            PluginFilter tested = PluginFilter.Create.HasVersion("1.0");

            DoAssert.Throws <ArgumentNullException>(() => tested.And(null));
        }