Ejemplo n.º 1
0
        public async Task GetAllKeysAsync_should_call_wrapper_method()
        {
            var keyManagerMock = new Mock <IKeyManager>();

            keyManagerMock.Setup(m => m.GetAllKeys()).Returns(new List <IKey>()).Verifiable();
            var defaultResolverMock = new Mock <IDefaultKeyResolver>();
            var providerClientMock  = new Mock <IProviderClient>();
            var wrapper             = new KeyManagerWrapper <IAuthenticatedEncryptorDescriptor>(keyManagerMock.Object, defaultResolverMock.Object, providerClientMock.Object);

            var sut = new KeyStore <string, IAuthenticatedEncryptorDescriptor>(wrapper);

            await sut.GetAllKeysAsync().ConfigureAwait(false);

            keyManagerMock.Verify();
        }