public void ConvertFromDirectoryValueReturnsNullOnNullInput() { // Fixture setup // Exercise system and verify outcome DistinguishedName.ConvertFromDirectoryValue(null).Should().BeNull(); }
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'."); }