public virtual void TestClone() { var q = new DrillDownQuery(config, new MatchAllDocsQuery()); q.Add("a"); var clone = q.Clone() as DrillDownQuery; Assert.NotNull(clone); clone.Add("b"); Assert.False(q.ToString().Equals(clone.ToString(), StringComparison.Ordinal), "query wasn't cloned: source=" + q + " clone=" + clone); }
public virtual void TestClone() { var q = new DrillDownQuery(config, new MatchAllDocsQuery()); q.Add("a"); var clone = q.Clone() as DrillDownQuery; Assert.NotNull(clone); clone.Add("b"); Assert.False(q.ToString().Equals(clone.ToString()), "query wasn't cloned: source=" + q + " clone=" + clone); }