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