Example #1
0
 public void CannotUpdateBallWithNegativePrice()
 {
     Assert.Catch(() =>
     {
         var x = new Ball("Test Ball", 100, Currency.EUR);
         x.SetAttributes("New Name", -39.90m, Currency.EUR);
     });
 }
Example #2
0
 public void CannotUpdateBallWithEmptyTitle2()
 {
     Assert.Catch(() =>
     {
         var x = new Ball("Test Ball", 100, Currency.EUR);
         x.SetAttributes("", 39.90m, Currency.EUR);
     });
 }
Example #3
0
        public void CanUpdateBallWithPrice()
        {
            var x = new Ball("Test Ball", 100, Currency.EUR);
            x.SetAttributes("New Name", 39.90m, Currency.EUR);

            Assert.IsTrue(x.Price.Amount == 39.90m);
            Assert.IsTrue(x.Price.Unit == Currency.EUR);
        }