public NotificationTransitStateTests() { transportRoute = new TransportRoute(AnyGuid); var firstCountry = CountryFactory.Create(new Guid("A5E60A6E-D237-461F-8737-FE8190CEC1BC")); var secondCountry = CountryFactory.Create(new Guid("DB611B2D-2EF2-42AA-8857-B4B953D91767")); var thirdCountry = CountryFactory.Create(new Guid("C5C282CE-D4A6-4F81-BCD9-2518098D1D85")); transportRoute.AddTransitStateToNotification(TransitStateFactory.Create(FirstTransitStateId, firstCountry, 1)); transportRoute.AddTransitStateToNotification(TransitStateFactory.Create(SecondTransitStateId, secondCountry, 2)); transportRoute.AddTransitStateToNotification(TransitStateFactory.Create(ThirdTransitStateId, thirdCountry, 3)); }
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); }