コード例 #1
0
        public void ConvertFromDirectoryValueReturnsNullOnNullInput()
        {
            // Fixture setup

            // Exercise system and verify outcome
            DistinguishedName.ConvertFromDirectoryValue(null).Should().BeNull();
        }
コード例 #2
0
        public void ExceptionShouldBeThrownForAttemptConvertValueInappropriateSyntax()
        {
            // Fixture setup

            // Exercise system
            Action call = () => DistinguishedName.ConvertFromDirectoryValue("non DN string");

            // Verify outcome
            call.Should().Throw <DirectoryServicesException>()
            .WithMessage("Value 'non DN string' of type 'System.String' not suitable to syntax 'DNString' of directory property 'distinguishedName'.");
        }