public void TestWhenIdIsAMatchFileAreEqual() { //ARRANGE fileStreamOne = new FileStream(fileOnePath, FileMode.Open); fileStreamTwo = new FileStream(fileTwoPath, FileMode.Open); string bytesAsString = FileHelpers.GetByteArrayAsString(fileOneBytes); const string iD = "<41667C9D25F55FF22D2A7A93B949D904>\n<36E081B23E919687F6F7198B39158ED0>"; const bool expected = true; //ACT bool actual = FileHelpers.CheckId(bytesAsString, iD); //ASSERT Assert.AreEqual(actual, expected); //CLOSE STREAMS fileStreamOne.Close(); fileStreamTwo.Close(); }
public void TestWhenIdIsNotAMatchFilesAreNotEqual() { //ARRANGE fileStreamOne = new FileStream(fileOnePath, FileMode.Open); fileStreamTwo = new FileStream(fileTwoPath, FileMode.Open); string bytesAsString = FileHelpers.GetByteArrayAsString(fileOneBytes); const string iD = "/ID [<.*>]"; const bool expected = false; //ACT bool actual = FileHelpers.CheckId(bytesAsString, iD); //ASSERT Assert.AreEqual(actual, expected); //CLOSE STREAMS fileStreamOne.Close(); fileStreamTwo.Close(); }