Esempio n. 1
0
        private void Then_The_Extension_Matches(string file)
        {
            var ext = Path.GetExtension(file);
            var s   = r.PossibleExtensions(bytesFile)
                      .Select(it => it.ToUpper())
                      .ToArray();

            if (r.CanRecognizeExtension(ext))
            {
                s.Should().HaveCountGreaterThan(0, $"for {r.GetType().Name} extension {ext} recognized , but not found in possible extension");
                //Assert.True(s.Any());
                ext = ext.Replace(".", "").ToUpper();
                s.Should().Contain(ext, $"{ext} must have been recognized properly");
            }
            else
            {
                s.Should().BeEmpty($"for {r.GetType().Name} extension {ext} recognized , but not found in possible extension");
                //Assert.False(s.Any());
            }
        }
Esempio n. 2
0
 public void TestDuplicates(RecognizeFileExt r)
 {
     //This should have tostring to recognize
     r.DuplicatesBytes().Should().BeEmpty($"{r.GetType().Name} have duplicates");
     //Assert.Empty(r.Duplicates());
 }