Пример #1
0
        public void ChangeEmail()
        {
            var apiRepository = new ApiMongoRepository(CONNECTION_STRING);
            var repository    = new MongoRepository(CONNECTION_STRING,
                                                    apiRepository);
            var userName = "******";
            var secret   = "test";
            var manager  = repository.CreateManager(userName, secret);

            repository.ChangeEmail(manager.Id, secret, "*****@*****.**");
            manager = repository.GetManager(manager.Id);
            Assert.AreEqual(manager.UserName, "*****@*****.**");
            repository.DeleteManager(manager.Id, secret);
        }