public GetCustomsOfficeRequiredStatusByNotificationIdHandlerTests()
        {
            notification1 = NotificationApplicationFactory.Create(TestIwsContext.UserId, NotificationType.Recovery, UKCompetentAuthority.England, 500);
            notificationId = new Guid("295B0511-D0EB-43B4-9D17-938E1A34F0D3");

            EntityHelper.SetEntityId(notification1, notificationId);

            var transport = new TransportRoute(notificationId);

            context = new TestIwsContext();

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

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

            handler = new GetCustomsCompletionStatusByNotificationIdHandler(repository);
        }
Ejemplo n.º 2
0
        public GetCustomsOfficeRequiredStatusByNotificationIdHandlerTests()
        {
            notification1  = NotificationApplicationFactory.Create(TestIwsContext.UserId, NotificationType.Recovery, UKCompetentAuthority.England, 500);
            notificationId = new Guid("295B0511-D0EB-43B4-9D17-938E1A34F0D3");

            EntityHelper.SetEntityId(notification1, notificationId);

            var transport = new TransportRoute(notificationId);

            context = new TestIwsContext();

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

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

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

            handler = new GetCustomsCompletionStatusByNotificationIdHandler(repository);
        }