public void hash_group_of_files_by_modified_date()
{
var file1 = "a.txt";
var file2 = "b.txt";
var file3 = "c.txt";
new FileSystem().WriteStringToFile(file1, "something");
new FileSystem().WriteStringToFile(file2, "else");
new FileSystem().WriteStringToFile(file3, "altogether");
Thread.Sleep(1000);
// Isn't dependent upon order of the files
var hash1 = new string[]{file1, file2, file3}.HashByModifiedDate();
var hash2 = new string[] { file2, file3, file1 }.HashByModifiedDate();
var hash3 = new string[] { file2, file1, file3 }.HashByModifiedDate();
hash1.ShouldBe(hash2);
hash1.ShouldBe(hash3);
var hash4 = new string[] { file1, file2 }.HashByModifiedDate();
hash4.ShouldNotBe(hash1);
new FileSystem().WriteStringToFile(file1, "else");
Thread.Sleep(1000);
var hash5 = new string[] { file2, file1, file3 }.HashByModifiedDate();
hash5.ShouldNotBe(hash1);
}