コード例 #1
0
        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); }
        }
コード例 #2
0
        public void DelegationTokenReaderInvalidPathTest(string path)
        {
            var supplier = new FileDelegationTokenSupplier(path);

            Assert.ThrowsAny <Exception>(() => supplier.GetKey());
        }