public void DelegationTokenReaderValidPathTest(string actual, string expected) { string path = @".\delegation_token" + DateTime.Now.ToFileTimeUtc(); try { System.IO.File.WriteAllText(path, actual); var supplier = new FileDelegationTokenSupplier(path); Assert.Equal(supplier.GetKey(), expected); } finally { File.Delete(path); } }
public void DelegationTokenReaderInvalidPathTest(string path) { var supplier = new FileDelegationTokenSupplier(path); Assert.ThrowsAny <Exception>(() => supplier.GetKey()); }