Esempio n. 1
0
        public void DeleteRole()
        {
            var apiRepository = new ApiMongoRepository(CONNECTION_STRING);
            var repository    = new MongoRepository(CONNECTION_STRING,
                                                    apiRepository);
            var userName = "******";
            var secret   = "test";
            var manager  = repository.CreateManager(userName, secret);

            var domain = repository.CreateDomain("test", manager);

            var role = repository.CreateRole(domain.Id, "test");

            repository.DeleteRole(role);

            role = repository.GetRole(domain.Id, "test");

            Assert.IsNull(role);
            repository.DeleteManager(manager.Id, secret);
        }