Example #1
0
 public void CannotCreateRahmenWithNegativePrice()
 {
     Assert.Catch(() =>
     {
         var x = new Rahmen("KTM", "Ultra Sport 2016", -1, Waehrung.EUR);
     });
 }
Example #2
0
 public void CannotCreateRahmenModell2()
 {
     Assert.Catch(() =>
     {
         var x = new Rahmen("KTM", "", 403.99m, Waehrung.EUR);
     });
 }
Example #3
0
 public void CannotCreateRahmen2()
 {
     Assert.Catch(() =>
     {
         var x = new Rahmen("", "Ultra Sport 2016", 403.99m, Waehrung.EUR);
     });
 }
Example #4
0
 public void CannotUpdateRahmenWithNegativePrice()
 {
     Assert.Catch(() =>
     {
         var x = new Rahmen("KTM", "Ultra Sport 2016", 403.99m, Waehrung.EUR);
         x.UpdatePrice(-9.90m, Waehrung.JPY);
     });
 }
Example #5
0
        public void CanUpdateRahmenWithPrice()
        {
            var x = new Rahmen("KTM", "Ultra Sport 2016", 403.99m, Waehrung.EUR);

            x.UpdatePrice(39.90m, Waehrung.JPY);

            Assert.IsTrue(x.Preis.Amount == 39.90m);
            Assert.IsTrue(x.Preis.Unit == Waehrung.JPY);
        }
Example #6
0
        public void CanCreateRahmen()
        {
            var x = new Rahmen("KTM", "Ultra Sport 2016", 403.99m, Waehrung.EUR);

            Assert.IsTrue(x.Produzent == "Real-Time Rendering");
            Assert.IsTrue(x.Modell == "Ultra Sport 2016");
            Assert.IsTrue(x.Preis.Amount == 403.99m);
            Assert.IsTrue(x.Preis.Unit == Waehrung.EUR);
        }