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)); }
public void HasInfoShouldNotAcceptNull() { PluginFilter original = PluginFilter.Create.IsNamed("original"); DoAssert.Throws <ArgumentNullException>(() => original.HasInfo((String)null)); }