예제 #1
0
        public void GetInfobox_WikiTextIsNullOrWhiteSpace_ShouldReturnNull(string input)
        {
            // Arrange
            var parser = new InfoboxParser(mockedCommons);

            // Act
            var result = parser.GetInfobox(input);

            // Assert
            Assert.Null(result);
        }
예제 #2
0
        public void GetInfobox_WikiTextContainsInfoboxForBothWorlds_ShouldReturnMultipleResults()
        {
            // Arrange
            var input = "{{Infobox Buildings Old and New World";

            var parser = new InfoboxParser(mockedCommons);

            // Act
            var result = parser.GetInfobox(input);

            // Assert
            Assert.Equal(2, result.Count);
        }
예제 #3
0
        public void GetInfobox_WikiTextContainsInfobox_ShouldReturnSingleResult()
        {
            // Arrange
            var input = "{{Infobox Buildings";

            var parser = new InfoboxParser(mockedCommons);

            // Act
            var result = parser.GetInfobox(input);

            // Assert
            Assert.Single(result);
        }