Exemplo n.º 1
0
 public void CannotCreateDressWhereSizeBiggerThan48()
 {
     Assert.Catch(() =>
     {
         var x = new Dirndl("Tiroler Dirndl", 50, 99.90m);
     });
 }
Exemplo n.º 2
0
 public void CannotCreateDressWherePriceIsNegative()
 {
     Assert.Catch(() =>
     {
         var x = new Dirndl("Tiroler Dirndl", 34, -1m);
     });
 }
Exemplo n.º 3
0
 public void CannotCreateDressWhereSizeLessThan32()
 {
     Assert.Catch(() =>
     {
         var x = new Dirndl("Tiroler Dirndl", 31, 99.90m);
     });
 }
Exemplo n.º 4
0
 public void CannotCreateDressWhereNameIsNull()
 {
     Assert.Catch(() =>
     {
         var x = new Dirndl(null, 37, 50.90m);
     });
 }
Exemplo n.º 5
0
 public void CannotCreateDressWhereNameIsEmpty()
 {
     Assert.Catch(() =>
     {
         var x = new Dirndl("", 37, 50.90m);
     });
 }
Exemplo n.º 6
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);
        }