コード例 #1
0
        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");
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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");
        }
コード例 #4
0
        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>();
        }
コード例 #5
0
ファイル: ArtFile.cs プロジェクト: garmstrong11/ImageRenamer
 protected bool Equals(ArtFile other)
 {
     return _fileInfo.Equals(other._fileInfo);
 }