public void CustomTaskLogging() { //Arrange //Act CustomTask.Execute("Test custom task 4", () => { }); //Assert Assert.Equal(2, CountLogEntries("CustomTask")); }
public void TestLogging() { CreateLogTablesTask.CreateLog(); CustomTask.Execute("Test custom task 4", Action1); Assert.AreEqual(2, new SqlTask("Find log entry", "select count(*) from etl.Log where TaskType='CUSTOM' group by TaskHash") { DisableLogging = true }.ExecuteScalar <int>()); }
public void ActionChangingValue() { //Arrange Action2Value = 0; //Act CustomTask.Execute("Test custom task 2", Action2, 5); //Assert Assert.Equal(5, Action2Value); }
public void SimpleAction() { //Arrange Action1Executed = false; //Act CustomTask.Execute("Test custom task 1", Action1); //Assert Assert.True(Action1Executed); }
public void ActionWith2Parameter() { //Arrange Action3Value1 = null; Action3Value2 = false; //Act CustomTask.Execute("Test custom task 3", Action3, "t", true); //Assert Assert.Equal("t", Action3Value1); Assert.True(Action3Value2); }
private void RunSubSequence() { Sequence.Execute("Test sub sequence 1.1", () => { SqlTask.ExecuteNonQuery($"Sql #2", "Select 1 as test"); SqlTask.ExecuteNonQuery($"Sql #3", "Select 1 as test"); LogTask.Warn("Warn message #1"); }); Sequence.Execute("Test sub sequence 1.2", () => { SqlTask.ExecuteNonQuery($"Sql #4", "Select 1 as test"); }); Sequence.Execute("Test sub sequence 1.3", () => { Sequence.Execute("Test sub sequence 2.1", () => { Sequence.Execute("Test sub sequence 3.1", () => { SqlTask.ExecuteNonQuery($"Sql #5", "Select 1 as test"); SqlTask.ExecuteNonQuery($"Sql #6", "Select 1 as test"); LogTask.Warn("Warn message #2"); }); CustomTask.Execute($"Custom #1", () => {; }); SqlTask.ExecuteNonQuery($"Sql #7", "Select 1 as test"); }); Sequence.Execute("Test sub sequence 2.2", () => { CustomTask.Execute($"Custom #2", () => {; }); SqlTask.ExecuteNonQuery($"Sql #7", "Select 1 as test"); }); Sequence.Execute("Test sub sequence 2.3", () => { SqlTask.ExecuteNonQuery($"Sql #8", "Select 1 as test"); CustomTask.Execute($"Custom #2", () => {; }); Sequence.Execute("Test sub sequence 3.3", () => { SqlTask.ExecuteNonQuery($"Sql #9", "Select 1 as test"); SqlTask.ExecuteNonQuery($"Sql #10", "Select 1 as test"); LogTask.Error("Error message"); }); }); }); CustomTask.Execute($"Custom #3", () => {; }); }
public void TestCustomTask3() { CustomTask.Execute("Test custom task 3", Action3, "t", true); Assert.AreEqual("t", Action3Value1); Assert.IsTrue(Action3Value2); }
public void TestCustomTask2() { CustomTask.Execute("Test custom task 2", Action2, 5); Assert.AreEqual(5, Action2Value); }
public void TestCustomTask1() { CustomTask.Execute("Test custom task 1", Action1); Assert.IsTrue(Action1Executed); }