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