Exemple #1
0
        public void HasInfoShouldAndCombineWithNewIsTypeOfFilter()
        {
            var          name     = "name";
            PluginFilter original = PluginFilter.Create.IsNamed("original");
            PluginFilter tested   = original.HasInfo(name);

            Assert.AreEqual(PluginFilter.FilterOperation.And, tested.Operation);
            Assert.AreEqual(2, tested.SubFilters.Length);
            Assert.IsTrue(tested.SubFilters.Contains(original));
            Assert.IsTrue(tested.SubFilters.Any(x => x.Operation == PluginFilter.FilterOperation.HasInfo && x.OperationData == name));
        }
Exemple #2
0
        public void HasInfoShouldNotAcceptNull()
        {
            PluginFilter original = PluginFilter.Create.IsNamed("original");

            DoAssert.Throws <ArgumentNullException>(() => original.HasInfo((String)null));
        }