Example #1
0
        public void PennyTests()
        {
            var penny = new Penny();

            Assert.AreEqual(0.01m, penny.Value);
            Assert.AreEqual("Penny", penny.Name);
        }
        public void PennyTest()
        {
            ICurrency penny = new Penny();

            Assert.AreEqual("Penny", penny.Name);
            Assert.AreEqual(0.01m, penny.Value);
        }
        public void PennyTest()
        {
            ICurrency penny = new Penny();

            // creating an instance of ICurrency since Penny is implementing ICurrency
            // also making it an ICurrency instance so we can jump around between classes we created (Penny, Dime, Dollar)

            Assert.AreEqual("Penny", penny.Name);
            Assert.AreEqual(0.01m, penny.Value);
        }