public RemoveTransitStateForNotificationHandlerTests()
        {
            var userContext = A.Fake<IUserContext>();
            A.CallTo(() => userContext.UserId).Returns(Guid.Empty);
            context = new TestIwsContext(userContext);

            var notification = NotificationApplicationFactory.Create(ExistingNotificationId);
            var transport = new TransportRoute(ExistingNotificationId);

            transport.AddTransitStateToNotification(TransitStateFactory.Create(ExistingTransitStateId, 
                CountryFactory.Create(new Guid("3E7A0092-B6CB-46AD-ABCC-FB741EB6CF35")), 1));

            context.NotificationApplications.Add(notification);
            context.TransportRoutes.Add(transport);

            var repository = A.Fake<ITransportRouteRepository>();
            A.CallTo(() => repository.GetByNotificationId(ExistingNotificationId)).Returns(transport);

            handler = new RemoveTransitStateForNotificationHandler(context, repository);
        }
Beispiel #2
0
        public RemoveTransitStateForNotificationHandlerTests()
        {
            var userContext = A.Fake <IUserContext>();

            A.CallTo(() => userContext.UserId).Returns(Guid.Empty);
            context = new TestIwsContext(userContext);

            var notification = NotificationApplicationFactory.Create(ExistingNotificationId);
            var transport    = new TransportRoute(ExistingNotificationId);

            transport.AddTransitStateToNotification(TransitStateFactory.Create(ExistingTransitStateId,
                                                                               CountryFactory.Create(new Guid("3E7A0092-B6CB-46AD-ABCC-FB741EB6CF35")), 1));

            context.NotificationApplications.Add(notification);
            context.TransportRoutes.Add(transport);

            var repository = A.Fake <ITransportRouteRepository>();

            A.CallTo(() => repository.GetByNotificationId(ExistingNotificationId)).Returns(transport);

            handler = new RemoveTransitStateForNotificationHandler(context, repository);
        }