Beispiel #1
0
 protected static void Init(TestContext testContext)
 {
     SetTestSettings();
     Mediator = MediatorBuilder.BuildMediator();
     _writeUserProfileRepository = ResolverRoot.Resolve <IWriteUserProfileRepository>();
     FillDatabaseWithTestData();
 }
        public async Task UserProfileMustBeCreated()
        {
            var userProfileController = ResolverRoot.Resolve <UserProfilesController>();
            var isCreated             = await userProfileController.Post(defaultNewProfile);

            Assert.IsTrue(isCreated);
        }
        public async Task UserProfileMustProduce400ErrorIfInvalidaData()
        {
            var userProfileController = ResolverRoot.Resolve <UserProfilesController>();

            defaultNewProfile.FirstName = null;
            await userProfileController.Post(defaultNewProfile);
        }
Beispiel #4
0
        public static void PreInitConfiguration(TestContext testContext)
        {
            Init(testContext);

            _readUsersRepository  = ResolverRoot.Resolve <IReadUserProfileRepository>();
            _writeUsersRepository = ResolverRoot.Resolve <IWriteUserProfileRepository>();

            defaultPersonalInformation = PersonalInformation.Factory.Create(firstName: "Jack", lastName: "Simon");
            defaultAddress             = Address.Factory.Create(city: "London");
            loginData   = LoginData.Factory.Create(login: "******", password: "******");
            defaultUser = User.Factory.Create(defaultPersonalInformation, defaultAddress, loginData);
        }
 public static void PreInitConfiguration(TestContext testContext)
 {
     Init(testContext);
     _readUserProfileRepository = ResolverRoot.Resolve <IReadUserProfileRepository>();
 }