예제 #1
0
            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);
            }
예제 #2
0
            public void Should_ThrowException_When_ColourNotFound(string bagColour)
            {
                var sut = new BagService(DemoValidRules.Rules.ToArray());

                Assert.Throws <ArgumentException>(() => sut.FindNumberOfBagsThatEventuallyContain(bagColour));
            }