Example #1
0
        public async Task ExistsAsync()
        {
            Assert.False(await _identityRepository.ExistsAsync(Id.Null));

            var identity = IdentityGenerator.Default;

            Assert.False(await _identityRepository.ExistsAsync(identity.Id));

            var result = await _identityRepository.AddAsync(identity, o => o.ImmediateConsistency());

            Assert.Equal(identity, result);

            Assert.True(await _identityRepository.ExistsAsync(identity.Id));
        }
        public async Task Exists()
        {
            Assert.False(await _identityRepository.ExistsAsync(null));

            var identity = IdentityGenerator.Default;

            Assert.False(await _identityRepository.ExistsAsync(identity.Id));

            var result = await _identityRepository.AddAsync(identity);

            Assert.Equal(identity, result);

            await _client.RefreshAsync();

            Assert.True(await _identityRepository.ExistsAsync(identity.Id));
        }