public void ShouldNotEquals() { ZeroOrMore a, b; a = new ZeroOrMore(); a.Item = new Terminal('a'); b = new ZeroOrMore(); 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() { ZeroOrMore a, b; a = new ZeroOrMore(); a.Item = new Terminal('a'); b = new ZeroOrMore(); b.Item = new Terminal('a'); Assert.IsTrue(a.Equals(b)); Assert.IsTrue(b.Equals(a)); }