Esempio n. 1
0
 public void CannotCalculateNetPriceWithNegativePrice()
 {
     Assert.Catch(() =>
     {
         var x = new Abendkleid("blaues Abendkleid", 36, -114.90m);
         x.CalculateNetPrice();
     });
 }
Esempio n. 2
0
        public void CanCreateDress()
        {
            var x = new Abendkleid("Abendkleid", 37, 78.95m);

            Assert.IsTrue(x.Name == "Abendkleid");
            Assert.IsTrue(x.Size == 37);
            Assert.IsTrue(x.PriceGross == 78.95m);
        }
Esempio n. 3
0
        public void CanCalculateNetPrice()
        {
            var x = new Abendkleid("rotes Abendkleid", 36, 114.90m);

            x.CalculateNetPrice();

            Assert.IsTrue(x.PriceGross / 1.2m == 95.75m);
        }
Esempio n. 4
0
        private static void RunSerialization()
        {
            var d = new Dirndl("Marchegg Dirndl", 40, 49.90m);
            var e = new Abendkleid("Kleines Schwarzes", 42, 34.40m);

            d.Print();
            e.Print();

            foreach (var dress in Dresses)
            {
                Console.WriteLine();
                dress.Print();
            }

            Serialization.Run(Dresses);
        }