public GetOrganisationDetailsByUserHandlerTests()
        {
            userContext = A.Fake<IUserContext>();
            A.CallTo(() => userContext.UserId).Returns(userId);

            context = new TestIwsContext(userContext);

            var country = CountryFactory.Create(new Guid("05C21C57-2F39-4A15-A09A-5F38CF139C05"));
            context.Countries.Add(country);

            context.Organisations.Add(GetOrganisation());

            context.Users.Add(GetUser());

            message = new GetOrganisationDetailsByUser();
            handler = new GetOrganisationDetailsByUserHandler(context, userContext);
        }
Example #2
0
        public GetOrganisationDetailsByUserHandlerTests()
        {
            userContext = A.Fake <IUserContext>();
            A.CallTo(() => userContext.UserId).Returns(userId);

            context = new TestIwsContext(userContext);

            var country = CountryFactory.Create(new Guid("05C21C57-2F39-4A15-A09A-5F38CF139C05"));

            context.Countries.Add(country);

            context.Organisations.Add(GetOrganisation());

            context.Users.Add(GetUser());

            message = new GetOrganisationDetailsByUser();
            handler = new GetOrganisationDetailsByUserHandler(context, userContext);
        }