Пример #1
0
        public void CorrectExceptionThrownForInvalidValueOnFromFqdn(string value)
        {
            // Fixture setup
            Action call = () => DN.FromFqdn(value);

            // Exercise system and verify outcome
            call.Should().Throw <ArgumentOutOfRangeException>()
            .WithMessage("Fqdn string can not be null or white space.");
        }
Пример #2
0
        public void FromCorrectFqdnStringReturnsCorrectDn()
        {
            // Fixture setup
            var fqdnString = @"domain.com";

            // Exercise system
            var dn = DN.FromFqdn(fqdnString);

            // Verify outcome
            dn.ToString().Should().Be(@"DC=domain,DC=com");
        }