Ejemplo n.º 1
0
        public void When_The_Points_Spent_Is_More_Than_The_Points_Earnt_An_Exception_Is_Thrown()
        {
            // Arrange
            var customer = new StubCustomer();
            customer.SetPointsEarned(5);
            customer.PointsSpent = 10;

            //Assert
            Assert.Throws(typeof (ArgumentOutOfRangeException), () => customer.GetPointsBalance());
        }
Ejemplo n.º 2
0
        public void The_Balance_Is_Equal_To_The_Number_Of_Points_Earnt_Minus_Number_Of_Points_Spent()
        {
            //Arrange
            var customer = new StubCustomer();
            customer.SetPointsEarned(5);
            customer.PointsSpent = 3;

            //Act
            var result = customer.GetPointsBalance();

            //Assert
            Assert.AreEqual(2, result);
        }