public virtual void TestShouldBeRecursive_ALL() { TreeFilter a = TreeFilter.ALL; TreeFilter n = NotTreeFilter.Create(a); NUnit.Framework.Assert.AreEqual(a.ShouldBeRecursive(), n.ShouldBeRecursive()); }
public virtual void TestNegateIsUnwrap() { TreeFilter a = PathFilter.Create("a/b"); TreeFilter n = NotTreeFilter.Create(a); NUnit.Framework.Assert.AreSame(a, n.Negate()); }
public virtual void TestShouldBeRecursive_PathFilter() { TreeFilter a = PathFilter.Create("a/b"); NUnit.Framework.Assert.IsTrue(a.ShouldBeRecursive()); TreeFilter n = NotTreeFilter.Create(a); NUnit.Framework.Assert.IsTrue(n.ShouldBeRecursive()); }
public virtual void TestCloneIsSparseWhenPossible() { TreeFilter a = TreeFilter.ALL; NUnit.Framework.Assert.AreSame(a, a.Clone()); TreeFilter n = NotTreeFilter.Create(a); NUnit.Framework.Assert.AreSame(n, n.Clone()); }
public virtual void TestCloneIsDeepClone() { TreeFilter a = new AlwaysCloneTreeFilter(); NUnit.Framework.Assert.AreNotSame(a, a.Clone()); TreeFilter n = NotTreeFilter.Create(a); NUnit.Framework.Assert.AreNotSame(n, n.Clone()); }
public virtual void TestWrap() { TreeWalk tw = new TreeWalk(db); TreeFilter a = TreeFilter.ALL; TreeFilter n = NotTreeFilter.Create(a); NUnit.Framework.Assert.IsNotNull(n); NUnit.Framework.Assert.IsTrue(a.Include(tw)); NUnit.Framework.Assert.IsFalse(n.Include(tw)); }
/// <summary>Create a new filter that does the opposite of this filter.</summary> /// <remarks>Create a new filter that does the opposite of this filter.</remarks> /// <returns>a new filter that includes tree entries this filter rejects.</returns> public virtual TreeFilter Negate() { return(NotTreeFilter.Create(this)); }