Beispiel #1
0
            public void ViewCcDetailsIsSuccessful()
            {
                // Arrange
                var bookingManager = new BookingManager();
                var eventTrackingManager = new Mock<IEventTrackingManager>();
                //Check if the message is trying to be saved (create an event with the booking id, type cc viewed and message that is something like"user with username has seen the cc details for booking id blahblah")
                eventTrackingManager.Setup(b => b.CreateBookingEvent(It.Is<int>(i => i == BOOKING_ID), It.Is<BookingEventType>(i => i == BookingEventType.CcTokenViewed), It.IsRegex(string.Format("{1}{0}{1}", BOOKING_ID, ANYTHING))));
                bookingManager.EventTrackingManager = eventTrackingManager.Object;

                // Act
                bookingManager.ViewCcDetails(BOOKING_ID);

                // Assert
                eventTrackingManager.VerifyAll();
            }