public void TestCommonA(TestCommonATestCase testCase) { var parser = new IngredientItemParserCommonA(); var result = parser.Parse(testCase.Input); Assert.That(result.Candidates, Has.Count.EqualTo(testCase.ExpectedCount)); for (var i = 0; i < result.Candidates.Count(); i++) { Assert.That(result.Candidates.ElementAt(i).Name, Is.EqualTo(testCase.Expected[i].Name), "Ingredient name did not match."); Assert.That(result.Candidates.ElementAt(i).Amount, Is.EqualTo(testCase.Expected[i].Amount), "Ingredient amount did not match."); Assert.That(result.Candidates.ElementAt(i).Unit, Is.EqualTo(testCase.Expected[i].Unit), "Ingredient unit did not match"); Assert.That(result.Candidates.ElementAt(i).Note, Is.EqualTo(testCase.Expected[i].Note), "Ingredient note did not match"); } }
public void TestCommonARandom(TestCommonATestCase testCase) => TestCommonA(testCase);
public void TestCommonAAmount(TestCommonATestCase testCase) => TestCommonA(testCase);
public void TestCommonAUnit(TestCommonATestCase testCase) => TestCommonA(testCase);