public UserStoreTests(string collectionPrefix)
        {
            _databaseFixture  = new DatabaseFixture(collectionPrefix);
            _userCollection   = _databaseFixture.GetCollection <IdentityUser>();
            _collectionPrefix = collectionPrefix;

            _errorDescriber = new IdentityErrorDescriber();
            _userStore      = new UserStore <IdentityUser, IdentityRole>(_userCollection, _errorDescriber);


            _claim1 = new Claim("ClaimType1", "some value");
            _claim2 = new Claim("ClaimType2", "some other value");
            _claim3 = new Claim("other type", "some other value");

            _claim1SameType = new Claim(_claim1.Type, _claim1.Value + " different");

            _identityClaim1 = new IdentityClaim {
                ClaimType = _claim1.Type, ClaimValue = _claim1.Value
            };
            _identityClaim2 = new IdentityClaim {
                ClaimType = _claim2.Type, ClaimValue = _claim2.Value
            };
            _identityClaim3 = new IdentityClaim {
                ClaimType = _claim3.Type, ClaimValue = _claim3.Value
            };

            _identityClaim1SameType = new IdentityClaim {
                ClaimType = _claim1SameType.Type, ClaimValue = _claim1SameType.Value
            };
        }
Example #2
0
        public RoleStoreTests(string collectionPrefix)
        {
            _databaseFixture  = new DatabaseFixture(collectionPrefix);
            _roleCollection   = _databaseFixture.GetCollection <IdentityRole>();
            _collectionPrefix = collectionPrefix;

            _roleStore      = new RoleStore <IdentityRole>(_roleCollection);
            _errorDescriber = new IdentityErrorDescriber();
        }