示例#1
0
        public void Constructor_ThrowsOnTimeSpanTooLong()
        {
            var configuration = new DigestAuthenticatorConfiguration("blah", null, null, "realm", "12345678")
            {
                NonceValidDuration = TimeSpan.FromMinutes(61)
            };

            Assert.Throws <ArgumentException>(() => new DigestAuthenticator(configuration));
        }
示例#2
0
        public void Constructor_ThrowsOnPrivateKeyTooShort()
        {
            var configuration = new DigestAuthenticatorConfiguration("blah", null, null, "realm", "1234567");

            Assert.Throws <ArgumentException>(() => new DigestAuthenticator(configuration));
        }
示例#3
0
        public void Constructor_ThrowsOnEmptyRealm()
        {
            var configuration = new DigestAuthenticatorConfiguration("blah", null, null, string.Empty, "12345678");

            Assert.Throws <ArgumentException>(() => new DigestAuthenticator(configuration));
        }
示例#4
0
        public void Constructor_ThrowsOnEmptyPrivateKey()
        {
            var configuration = new DigestAuthenticatorConfiguration("blah", null, null, "realm", string.Empty);

            Assert.Throws <ArgumentException>(() => new DigestAuthenticator(configuration));
        }