예제 #1
0
        public void Credential_Set_Success()
        {
            var connection = new SubDirectoryConnection {
                Credential = new NetworkCredential("username", "password")
            };

            connection.Credential = null;
        }
예제 #2
0
        public void Timeout_SetValid_GetReturnsExpected()
        {
            var connection = new SubDirectoryConnection {
                Timeout = TimeSpan.Zero
            };

            Assert.Equal(TimeSpan.Zero, connection.Timeout);
        }
예제 #3
0
        public void Ctor_Default()
        {
            var connection = new SubDirectoryConnection();

            Assert.Empty(connection.ClientCertificates);
            Assert.Null(connection.Directory);
            Assert.Equal(new TimeSpan(0, 0, 30), connection.Timeout);
        }
예제 #4
0
        public void Timeout_SetNegative_ThrowsArgumentException()
        {
            var connection = new SubDirectoryConnection();

            Assert.Throws <ArgumentException>("value", () => connection.Timeout = TimeSpan.FromTicks(-1));
        }