public void VerifyFileChecksum_Pass(string algoritm, string hash) { var task = new VerifyChecksum { File = Path.Combine(AppContext.BaseDirectory, "TestResources", "lorem.bin"), BuildEngine = new MockEngine(), Algorithm = algoritm, Hash = hash, }; Assert.True(task.Execute(), "Task should pass"); }
public void VerifyFileChecksum_Fails(string algoritm, string hash) { var task = new VerifyChecksum { File = Path.Combine(AppContext.BaseDirectory, "TestResources", "lorem.bin"), BuildEngine = new MockEngine { ContinueOnError = true }, Algorithm = algoritm, Hash = hash, }; Assert.False(task.Execute(), "Task should fail"); }