public void ShouldNotEquals() { OneOrMore a, b; a = new OneOrMore(); a.Item = new Terminal('a'); b = new OneOrMore(); b.Item = new Terminal('b'); Assert.IsFalse(a.Equals(b)); Assert.IsFalse(a.Equals(null)); Assert.IsFalse(a.Equals(new AnyTerminal())); Assert.IsFalse(a.Equals(new EOS())); }
public void ShouldEquals() { OneOrMore a, b; a = new OneOrMore(); a.Item = new Terminal('a'); b = new OneOrMore(); b.Item = new Terminal('a'); Assert.IsTrue(a.Equals(b)); Assert.IsTrue(b.Equals(a)); }