Example #1
0
        public void RegisteredProducts_CanBeQueriedForPrice()
        {
            var market = new CommonMarket();

            market.Add("Gold", 4, 57800);
            market.Add("Iron", 20, 3910);

            Assert.AreEqual(57800, market.Query("Gold", 4));
            Assert.AreEqual(782, market.Query("Iron", 4));
        }
Example #2
0
        public void RegisteredProductWithIntergalacticUnits_GetsConvertedToArabic()
        {
            var market = new CommonMarket();

            market.Add("Silver", 2, 34);

            Assert.AreEqual(68, market.Query("Silver", 4));
        }