public async Task ThrowsObjectDisposedExceptionWhenDisposed()
 {
     using (var credentialCache = new CredentialCache())
     {
         credentialCache.Dispose();
         await Assert.ThrowsAsync<ObjectDisposedException>(
             async () => await credentialCache.GetObject<Tuple<string, string>>("_"));
     }
 }
Пример #2
0
 public async Task ThrowsObjectDisposedExceptionWhenDisposed()
 {
     using (var credentialCache = new CredentialCache())
     {
         credentialCache.Dispose();
         await Assert.ThrowsAsync <ObjectDisposedException>(
             async() => await credentialCache.GetObject <Tuple <string, string> >("_"));
     }
 }
Пример #3
0
 public async Task ThrowsObjectDisposedExceptionWhenDisposed()
 {
     using (var credentialCache = new CredentialCache())
     {
         credentialCache.Dispose();
         await Assert.ThrowsAsync <ObjectDisposedException>(
             async() => await credentialCache.Invalidate("_"));
     }
 }
        public async Task ThrowsObjectDisposedExceptionWhenDisposed()
        {
            using (var credentialCache = new CredentialCache())
            {
                await credentialCache.Flush();

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