Ejemplo n.º 1
0
        public async Task ThrowsObjectDisposedExceptionWhenDisposed()
        {
            using (var credentialCache = new CredentialCache())
            {
                await credentialCache.Flush();

                credentialCache.Dispose();
                await Assert.ThrowsAsync <ObjectDisposedException>(async() => await credentialCache.Flush());
            }
        }
        public async Task ThrowsObjectDisposedExceptionWhenDisposed()
        {
            using (var credentialCache = new CredentialCache())
            {
                await credentialCache.Flush();

                credentialCache.Dispose();
                await Assert.ThrowsAsync<ObjectDisposedException>(async () => await credentialCache.Flush());
            }
        }