public void CreateBackup() { string fn = Path.GetTempFileName(); string backupDir = Path.GetRandomFileName(); Directory.CreateDirectory(backupDir); DateTime dt = new DateTime(2015, 11, 23, 9, 31, 00); File.SetLastWriteTime(fn, dt); BackupFile bf = BackupFile.CreateBackup(fn, backupDir); Assert.IsNotNull(bf); Assert.AreEqual(dt, bf.TimeStamp.DateTime); Directory.Delete(backupDir, true); File.Delete(fn); }