public void Should_ReturnNumberOfColoursThatCanEventuallyContainABag_When_BagColourExistsWithAlternativeRules(string bagColour, int expectedNumberFound) { var sut = new BagService(DemoValidRules.RulesForPart2Testing.ToArray()); var actualNumberFound = sut.TotalNumberOfBagsContainedIn(bagColour); Assert.That(actualNumberFound == expectedNumberFound); }
public void Should_ThrowException_When_ColourNotFound(string bagColour) { var sut = new BagService(DemoValidRules.Rules.ToArray()); Assert.Throws <ArgumentException>(() => sut.TotalNumberOfBagsContainedIn(bagColour)); }