public void ShouldReturnFalseAndTheDefaultCodePoint_WhenTheSetIsEmpty() { // Arrange var set = new CodePointSet(); var test = new CodePoint(42); // Act var present = set.TryGetValue(test, out CodePoint result); // Assert Assert.False(present); Assert.Equal(default(CodePoint), result); }
public void ShouldReturnTrueAndTheGivenCodePoint_WhenTheHighElementIsInTheSet_1() { // Arrange var set = new CodePointSet(new[] { new CodePoint(42), new CodePoint(43), new CodePoint(44), new CodePoint(66), new CodePoint(1000), new CodePoint(1001), new CodePoint(1002), new CodePoint(1010) }); var test = new CodePoint(1000); // Act var present = set.TryGetValue(test, out CodePoint result); // Assert Assert.True(present); Assert.Equal(test, result); }
public void ShouldReturnFalseAndTheDefaultCodePoint_WhenTheElementIsNotInTheSet() { // Arrange var set = new CodePointSet(new[] { new CodePoint(42), new CodePoint(43), new CodePoint(44), new CodePoint(66), new CodePoint(1000), new CodePoint(1001), new CodePoint(1002), new CodePoint(1010) }); var test = new CodePoint(100); // Act var present = set.TryGetValue(test, out CodePoint result); // Assert Assert.False(present); Assert.Equal(default(CodePoint), result); }