public void Should_Convert_Directory_Path_To_String_Value_Using_FullPath() { var converter = new DirectoryPathConverter(); var result = converter.ConvertTo(DirectoryPath.FromString("c:/data/work"), typeof(string)); Assert.IsType <string>(result); Assert.Equal("c:/data/work", result); }
public void Should_Throw_NotSupportedException_When_Destination_Type_Is_Not_String() { var converter = new DirectoryPathConverter(); var result = Record.Exception(() => converter.ConvertTo(DirectoryPath.FromString("c:/data/work"), typeof(DateTime))); Assert.IsType <NotSupportedException>(result); }