public GetExitCustomsOfficeAddDataByNotificationIdTests() { context = new TestIwsContext(); var repository = A.Fake <ITransportRouteRepository>(); country = CountryFactory.Create(new Guid("05C21C57-2F39-4A15-A09A-5F38CF139C05")); exitCustomsOffice = new ExitCustomsOffice("any name", "any address", country); notification = NotificationApplicationFactory.Create(TestIwsContext.UserId, NotificationType.Recovery, UKCompetentAuthority.England, 500); transport = new TransportRoute(NotificationId); EntityHelper.SetEntityId(notification, NotificationId); context.Countries.Add(country); context.NotificationApplications.Add(notification); context.TransportRoutes.Add(transport); A.CallTo(() => repository.GetByNotificationId(NotificationId)).Returns(transport); handler = new GetExitCustomsOfficeAddDataByNotificationIdHandler(repository, new CustomsOfficeExitMap(context, new CountryMap(), new CustomsOfficeMap(new CountryMap()))); }
public GetExitCustomsOfficeAddDataByNotificationIdTests() { context = new TestIwsContext(); var repository = A.Fake<ITransportRouteRepository>(); country = CountryFactory.Create(new Guid("05C21C57-2F39-4A15-A09A-5F38CF139C05")); exitCustomsOffice = new ExitCustomsOffice("any name", "any address", country); notification = NotificationApplicationFactory.Create(TestIwsContext.UserId, NotificationType.Recovery, UKCompetentAuthority.England, 500); transport = new TransportRoute(NotificationId); EntityHelper.SetEntityId(notification, NotificationId); context.Countries.Add(country); context.NotificationApplications.Add(notification); context.TransportRoutes.Add(transport); A.CallTo(() => repository.GetByNotificationId(NotificationId)).Returns(transport); handler = new GetExitCustomsOfficeAddDataByNotificationIdHandler(repository, new CustomsOfficeExitMap(context, new CountryMap(), new CustomsOfficeMap(new CountryMap()))); }