public void HandlesEmptyValue() { var masker = new ValueSecret(null); var input = "abcdefg"; var positions = masker.GetPositions(input); Assert.Equal(0, positions.Count()); }
public void HandlesEmptyInput() { var masker = new ValueSecret("def"); string input = null; var positions = masker.GetPositions(input); Assert.Equal(0, positions.Count()); }
public void HandlesEmptyInput() { var masker = new ValueSecret("def"); string input = null; var positions = masker.GetPositions(input); Assert.Equal(0, positions.Count()); }
public void HandlesEmptyValue() { var masker = new ValueSecret(null); var input = "abcdefg"; var positions = masker.GetPositions(input); Assert.Equal(0, positions.Count()); }
public void GetPositionFromEndOfString() { var masker = new ValueSecret("efg"); string input = "abcdefg"; var positions = masker.GetPositions(input).ToList(); Assert.Equal(1, positions.Count); Assert.Equal(4, positions[0].Start); Assert.Equal(3, positions[0].Length); }
public void GetPositionFromEndOfString() { var masker = new ValueSecret("efg"); string input = "abcdefg"; var positions = masker.GetPositions(input).ToList(); Assert.Equal(1, positions.Count); Assert.Equal(4, positions[0].Start); Assert.Equal(3, positions[0].Length); }
public void GetsMultiplePositions() { var masker = new ValueSecret("def"); string input = "abcdefgdefg"; var positions = masker.GetPositions(input).ToList(); Assert.Equal(2, positions.Count); Assert.Equal(3, positions[0].Start); Assert.Equal(3, positions[0].Length); Assert.Equal(7, positions[1].Start); Assert.Equal(3, positions[1].Length); }
public void GetsOverlappingPositions() { var masker = new ValueSecret("cdcd"); string input = "abcdcdcdefg"; var positions = masker.GetPositions(input).ToList(); Assert.Equal(2, positions.Count); Assert.Equal(2, positions[0].Start); Assert.Equal(4, positions[0].Length); Assert.Equal(4, positions[1].Start); Assert.Equal(4, positions[1].Length); }
public void GetsMultiplePositions() { var masker = new ValueSecret("def"); string input = "abcdefgdefg"; var positions = masker.GetPositions(input).ToList(); Assert.Equal(2, positions.Count); Assert.Equal(3, positions[0].Start); Assert.Equal(3, positions[0].Length); Assert.Equal(7, positions[1].Start); Assert.Equal(3, positions[1].Length); }
public void GetsOverlappingPositions() { var masker = new ValueSecret("cdcd"); string input = "abcdcdcdefg"; var positions = masker.GetPositions(input).ToList(); Assert.Equal(2, positions.Count); Assert.Equal(2, positions[0].Start); Assert.Equal(4, positions[0].Length); Assert.Equal(4, positions[1].Start); Assert.Equal(4, positions[1].Length); }