public void LargeRelativeComplementWithOneMatch()
        {
            const int count = 10000;
            var       fisA  = new List <FileInfo>(count);

            for (var i = 0; i < count; ++i)
            {
                fisA.Add(new FileInfo($"c:\\{Guid.NewGuid()}.txt"));
            }

            // B has everything in A and one extra
            var extra = new FileInfo($"c:\\{Guid.NewGuid()}.txt");
            var fisB  = new List <FileInfo>(fisA)
            {
                extra
            };

            //
            var fisC = File.RelativeComplement(fisA, fisB);

            // Return the list of elements that are in B but not in A
            // in other words ... just 'extra'
            Assert.AreEqual(1, fisC.Count);
            Assert.IsTrue(File.Equals(fisC[0], extra));
        }
 public void NullRhsDirectoryInfoCompare()
 {
     Assert.IsFalse(File.Equals(new DirectoryInfo("c:/test/"), null));
 }
 public void DirectoriesAreEqual(string lhs, string rhs)
 {
     Assert.IsTrue(
         File.Equals(new DirectoryInfo(lhs), new DirectoryInfo(rhs)));
 }
 public void BothNullDirectoryInfoCompare()
 {
     Assert.IsTrue(File.Equals(null, null));
 }