public void MatchName_TildeErrorIsRemovedWhenPresent() { var info = new FileInfo(@"D:\Switch\Andrews\in\Correct 1 2 4 Wrong 3~2.tif"); var artFile = new ArtFile(info); artFile.MatchName.Should().Be("Correct 1 2 4 Wrong 3.tif"); }
public void ErrorText_NoErrorString_ReturnsEmptyString() { var info = new FileInfo(@"D:\Switch\Andrews\in\2015_Abita_Hamburgerday_HM.tif"); var artFile = new ArtFile(info); artFile.ErrorText.Should().Be(string.Empty); }
public void ErrorIndex_HasErrorString_FindsErrorText() { var info = new FileInfo(@"D:\Switch\Andrews\in\Correct 1 2 4 Wrong 3~2.tif"); var artFile = new ArtFile(info); artFile.ErrorText.Should().Be("Not the right color space"); }
public void ErrorIndex_OutOfRange_Throws() { var info = new FileInfo(@"D:\Switch\Andrews\in\Correct 1 2 4 Wrong 3~69.tif"); var artFile = new ArtFile(info); string test; Action act = () => test = artFile.ErrorText; act.ShouldThrow<KeyNotFoundException>(); }
protected bool Equals(ArtFile other) { return _fileInfo.Equals(other._fileInfo); }