Ejemplo n.º 1
0
        public void CanBeCancelledBy_NotUserWhoMadeReservationNotAdmin_ReturnsFalse()
        {
            //arrange

            var reservation = new Reservation();

            Reservation.User user = new Reservation.User {
                IsAdmin = false
            };
            reservation.MadeBy = null;

            //act
            var result = reservation.CanBeCancelledBy(user);

            //assert
            Assert.IsFalse(result);
        }
Ejemplo n.º 2
0
        public void CanBeCancelledBy_UserWhoMadeReservation_ReturnsTrue()
        {
            //arrange

            var reservation = new Reservation();

            Reservation.User user = new Reservation.User {
                IsAdmin = false
            };
            reservation.MadeBy = user;

            //act
            var result = reservation.CanBeCancelledBy(user);

            //assert
            //  Assert.IsTrue(result);
            //  Assert.That(result, Is.True);
            Assert.That(result == true);
        }