Beispiel #1
0
 public void CannotCalculateNetPriceWithNegativePrice()
 {
     Assert.Catch(() =>
     {
         var x = new Abendkleid("blaues Abendkleid", 36, -114.90m);
         x.CalculateNetPrice();
     });
 }
Beispiel #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);
        }
Beispiel #3
0
        public void CanCalculateNetPrice()
        {
            var x = new Abendkleid("rotes Abendkleid", 36, 114.90m);

            x.CalculateNetPrice();

            Assert.IsTrue(x.PriceGross / 1.2m == 95.75m);
        }
Beispiel #4
0
        static int Main(string[] args)
        {
            var d = new Dirndl("Marchegg Dirndl", 40, 49.90m);
            var e = new Abendkleid("Kleines Schwarzes", 42, 34.40m);

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

            var dresses = new IDress[]
            {
                new Dirndl("Dirndl Pink", 36, 59.90m),
                new Dirndl("Tiroler Dirndl", 38, 99.90m),
                new Dirndl("Salzburger Dirndl", 34, 79.90m),
                new Abendkleid("Abendkleid", 32, 40.00m)
            };

            foreach (var dress in dresses)
            {
                Console.WriteLine();
                dress.Print();
            }
            Serialization.Run(dresses);
            return(0);
        }