public void CannotCalculateNetPriceWithNegativePrice() { Assert.Catch(() => { var x = new Abendkleid("blaues Abendkleid", 36, -114.90m); x.CalculateNetPrice(); }); }
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); }
public void CanCalculateNetPrice() { var x = new Abendkleid("rotes Abendkleid", 36, 114.90m); x.CalculateNetPrice(); Assert.IsTrue(x.PriceGross / 1.2m == 95.75m); }
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); }