Ejemplo n.º 1
0
        /// <summary>
        /// Given an instance of an AxImp task, executes that task (assuming all necessary parameters
        /// have been set ahead of time) and verifies that the execution log does not contain the error
        /// corresponding to the resource name passed in. 
        /// </summary>
        /// <param name="t">The task to execute and check</param>
        /// <param name="errorResource">The name of the resource string to check the log for</param>
        /// <param name="args">Arguments needed to format the resource string properly</param>
        internal static void ExecuteTaskAndVerifyLogDoesNotContainErrorFromResource(AxTlbBaseTask t, string errorResource, params object[] args)
        {
            MockEngine e = new MockEngine();
            t.BuildEngine = e;

            bool taskPassed = t.Execute();

            VerifyLogDoesNotContainErrorFromResource(e, t.Log, errorResource, args);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Given an instance of an AxImp task, executes that task (assuming all necessary parameters
        /// have been set ahead of time) and verifies that the execution log contains the error
        /// corresponding to the resource name passed in. 
        /// </summary>
        /// <param name="t">The task to execute and check</param>
        /// <param name="errorResource">The name of the resource string to check the log for</param>
        /// <param name="args">Arguments needed to format the resource string properly</param>
        internal static void ExecuteTaskAndVerifyLogContainsErrorFromResource(AxTlbBaseTask t, string errorResource, params object[] args)
        {
            MockEngine e = new MockEngine();
            t.BuildEngine = e;

            bool taskPassed = t.Execute();
            Assert.False(taskPassed); // "Task should have failed"

            VerifyLogContainsErrorFromResource(e, t.Log, errorResource, args);
        }