예제 #1
0
        public void PennyAboutTest()
        {
            //Arrange
            Penny coin;

            //Act
            coin = new Penny();
            string expectedOutput = "US Penny is from 2017. It is worth $0.01. It was made in Denver.";

            //Assert
            Assert.AreEqual(coin.About(), expectedOutput);
        }
        static void Main(string[] args)
        {
            Console.WriteLine("Coininator 9000");

            //Make some Coins
            Nickel     n    = new Nickel();
            Penny      p    = new Penny();
            Quarter    q    = new Quarter();
            Dime       d    = new Dime();
            HalfDollar hd   = new HalfDollar();
            DollarCoin doll = new DollarCoin();

            Console.WriteLine("List of US Coins\n");

            Console.WriteLine(n.About());
            Console.WriteLine(p.About());
            Console.WriteLine(q.About());
            Console.WriteLine(d.About());
            Console.WriteLine(hd.About());
            Console.WriteLine(doll.About());


            Console.ReadKey();
        }
        public void USCoinPennyAbout()
        {
            //Arrange
            Penny p;

            //Act
            p = new Penny();
            //Assert
            Assert.AreEqual($"US Penny is from {System.DateTime.Now.Year}. It is worth {p.MonetaryValue:c}. It was made in Denver", p.About());
        }
예제 #4
0
        public void USCoinPennyAbout()
        {
            //Arrange
            p = new Penny();
            //Act

            //Assert
            Assert.AreEqual("US Penny is from 2018. It is worth $0.01. It was made in Philadelphia.", p.About());
        }
예제 #5
0
        public void PennyAbout()
        {
            //Arrange
            Penny p;

            //Act
            p = new Penny();

            //Assert
            Assert.AreEqual("Penny is from 2019. It is worth 0.01. It was made in Denver", p.About());
        }
        public void PennyAbout()
        {
            //Arrange

            double pennyValue = .01f;

            //Act
            p = new Penny();
            //Assert
            Assert.AreEqual($"US Penny is from {System.DateTime.Now.Year}. It is worth {pennyValue:c}. It was made in Denver", p.About());
        }
예제 #7
0
        public void USCoinPennyAbout()
        {
            //Arrange
            penny = new Penny();
            //Act

            //Assert
            Assert.AreEqual("US Penny is from 2017. It is worth $0.01. It was made in Denver.", penny.About());
        }
예제 #8
0
        public void USCoinPennyAbout()
        {
            //Arrange
            p = new Penny();

            //Act

            //Assert
            Assert.AreEqual($"Penny is from {DateTime.Now.Year.ToString()}. It is worth 0.01. It was made in Denver", p.About());
        }