Exemplo n.º 1
0
        public void SleepingBag_ToString()
        {
            var sleepingBag = new SleepingBag("Wonderful Sleeping bag", 20M, 2, 1.2M);

            Console.WriteLine(sleepingBag);
            Assert.AreEqual(sleepingBag.ToString(), sleepingBag.GetDescription());
        }
Exemplo n.º 2
0
        public void GetDescriptionOfSleepingBag()
        {
            var sleepingBag = new SleepingBag("Nice sleeping bad", 20M, 2, 1M);

            Assert.AreEqual(sleepingBag.Name + ": Soft and fluffy sleeping bag", sleepingBag.GetDescription());

            sleepingBag.Name = "Outdoor Research Kids Sleeping Bag";
            Assert.AreEqual("Outdoor Research Kids Sleeping Bag: Soft and fluffy sleeping bag", sleepingBag.GetDescription());
        }