Esempio n. 1
0
        public void LookupPrice_WhenMilk_ReturnsPrice()
        {
            var sut = new ItemCatalogue();

            Assert.That(sut.LookupPrice("Milk"), Is.EqualTo(1.15m));
        }
Esempio n. 2
0
        public void LookupPrice_WhenButter_ReturnsPrice()
        {
            var sut = new ItemCatalogue();

            Assert.That(sut.LookupPrice("Butter"), Is.EqualTo(0.80m));
        }
Esempio n. 3
0
        public void LookupPrice_WhenNoSuchItem_ThrowsException()
        {
            var sut = new ItemCatalogue();

            Assert.Throws <NoSuchItemException>(() => sut.LookupPrice("No such item"));
        }
Esempio n. 4
0
        public void LookupPrice_WhenBread_ReturnsPrice()
        {
            var sut = new ItemCatalogue();

            Assert.That(sut.LookupPrice("Bread"), Is.EqualTo(1.00m));
        }
Esempio n. 5
0
        public void LookupPrice_WhenNullOrEmpty_ThrowsException(string item)
        {
            var sut = new ItemCatalogue();

            Assert.Throws <ArgumentNullException>(() => sut.LookupPrice(item));
        }