public void SetUp() { _sut = new TextSimilarityAlgorithm(); _availableItems = new string[] { "Real Madrid C.F.", "FC Barcelona", "Deportivo La Coruña", "Real Betis", "Atlético Madrid" }; }
public void TryFindBestMatches_EmptyInput_ReturnsFalseAndEmptyResult() { //Arrange TextSimilarityAlgorithm textSimilarityAlgorithm = new TextSimilarityAlgorithm(); string teamName = ""; IEnumerable <string> actualMatches; bool expectedResult = false; // Act bool actualResult = textSimilarityAlgorithm.TryFindBestMatches(teamName, _availableItems, 1, out actualMatches); // Assert Assert.AreEqual(expectedResult, actualResult); Assert.AreEqual(0, actualMatches.Count()); }