public void ExtractTags_InputWithoutTags_ReturnsEmptyArray(string input) { var result = TagsHelper.ExtractTags(input); Assert.NotNull(result); Assert.Empty(result); }
[InlineData("#tag& ending with some symbol", "tag")] // TODO: do we need to check all possible ending symbols public void ExtractTags_InputWithOneTag_ReturnsTagRange(string input, string tag) { var result = TagsHelper.ExtractTags(input); Assert.Single(result); Assert.Equal(tag, result[0]); }
public void ExtractTags_InputWithMultipleTags_ReturnsCorrectTagRange(string input, string[] tagsContent) { var stringResult = tagsContent.GetResult(); var result = TagsHelper.ExtractTags(input); Assert.Equal(tagsContent.Length, result.Length); Assert.Equal(stringResult, result.GetResult()); }
public void ExtractTags_NullInput_ThrowsArgumentNullException() { string input = null; Assert.Throws <ArgumentNullException>(() => TagsHelper.ExtractTags(input)); }