Пример #1
0
        public ResourcesControllerFixture()
        {
            _sutBuilder       = new ResourcesControllerBuilder();
            _resourceComparer = new ResourceComparer();

            _resourceStore =
                new ResourceStoreBuilder()
                .WithDefaultResources()
                .Build();

            _sut = new ResourcesController(_resourceStore);
        }
Пример #2
0
        public RolesControllerFixture()
        {
            _sutBuilder = new RolesControllerBuilder();

            _resourceStore =
                new ResourceStoreBuilder()
                .WithDefaultResources()
                .Build();

            _roleStore =
                new RoleStoreBuilder(_resourceStore)
                .WithDefaultRoles()
                .Build();

            _sut = new RolesController(_roleStore, _resourceStore);

            _permissionComparer = new PermissionComparer();
            _roleComparer       = new RoleComparer(_permissionComparer);
        }
Пример #3
0
        public CredentialsControllerFixture()
        {
            _sutBuilder = new CredentialsControllerBuilder();

            _credentialVmComparer = new CredentialVmComparer(new RoleVmComparer());

            _resourceStore =
                new ResourceStoreBuilder()
                .WithDefaultResources()
                .Build();

            _roleStore =
                new RoleStoreBuilder(_resourceStore)
                .WithDefaultRoles()
                .Build();

            _credentialStore =
                new CredentialStoreBuilder(_roleStore)
                .WithDefaultCredentials()
                .Build();

            _sut = new CredentialsController(_roleStore, _resourceStore, _credentialStore);
        }