public void TestIncremental()
        {
            var sut = new TheCheckout(PricingRules());

            sut.Scan('A');
            Assert.That(sut.Items, Is.EquivalentTo(new Dictionary <char, int> {
                { 'A', 1 }
            }));

            sut.Scan('A');
            Assert.That(sut.Items, Is.EquivalentTo(new Dictionary <char, int> {
                { 'A', 2 }
            }));

            sut.Scan('B');
            Assert.That(sut.Items, Is.EquivalentTo(new Dictionary <char, int> {
                { 'A', 2 }, { 'B', 1 }
            }));
        }
        private static int Price(string goods)
        {
            var pricingRules = PricingRules();

            var sut   = new TheCheckout(pricingRules);
            var items = goods.ToCharArray();

            foreach (var item in items)
            {
                sut.Scan(item);
            }

            return(sut.GetTotal());
        }