Exemple #1
0
            public void AcceptBookingRecordsEventWithCorrectBookingId()
            {
                // Arrange
                const int BOOKING_ID = 123;

                var eventTrackingManager = new Mock<IEventTrackingManager>();
                eventTrackingManager.Setup(b => b.CreateBookingEvent(It.Is<int>(i => i == BOOKING_ID), It.Is<BookingEventType>(i => i == BookingEventType.Accepted), It.IsAny<string>()));

                var bookingManager = new BookingManager
                                         {
                                             EventTrackingManager = eventTrackingManager.Object
                                         };

                // Act
                bookingManager.AcceptBooking(BOOKING_ID);

                // Assert
                eventTrackingManager.VerifyAll();
            }