public void ShouldNotAddTheHighElement_WhenTheElementIsAlreadyPresent() { // Arrange var set = new CodePointSet(new[] { new CodePoint(42), new CodePoint(1000) }); var result = new CodePointSet(set); // Act result.Add(new CodePoint(1000)); // Assert Assert.Equivalent(new[] { new CodePoint(42), new CodePoint(1000) }, result); }
public void ShouldNotAddEof_WhenEofIsAlreadyPresent() { // Arrange var set = new CodePointSet(new[] { new CodePoint(42), new CodePoint(1000), CodePoint.Eof }); var result = new CodePointSet(set); // Act result.Add(CodePoint.Eof); // Assert Assert.Equivalent(new[] { new CodePoint(42), new CodePoint(1000), CodePoint.Eof }, result); }