/// <summary> /// Sets the operation timer mode. /// </summary> /// <param name="operationTimerMode">The timer mode.</param> /// <param name="direction">Indicates where the set came from.</param> public void SetOperationTimerMode(OperationTimerMode operationTimerMode, ActionDirection direction) { if (direction == ActionDirection.FromController) { this.view.SetIncludeOperationTimers(operationTimerMode == OperationTimerMode.IncludeOperationTimers); } this.wizardData.Configuration.operationTimerMode = operationTimerMode; }
/// <summary> /// Initialises a new instance of the <see cref="UnitTestGenerator"/> class. /// </summary> /// <param name="scenarioName">The name of the scenario.</param> /// <param name="namespaceName">The name of the namespace in which to place the unit test class.</param> /// <param name="unitTestClassName">The name to be given to the unit test class.</param> /// <param name="testMethodMode">Whether to include the test methods for the individual operations or not.</param> /// <param name="operationTimerMode">Whether to include timers for the individual operations or not.</param> public UnitTestGenerator(string scenarioName, string namespaceName, string unitTestClassName, TestMethodMode testMethodMode, OperationTimerMode operationTimerMode) { this.scenarioName = scenarioName; this.testMethodMode = testMethodMode; this.operationTimerMode = operationTimerMode; this.mainCcu = new CodeCompileUnit(); this.mainTestNamespace = new CodeNamespace(namespaceName); this.mainCcu.Namespaces.Add(this.mainTestNamespace); this.stubCcu = new CodeCompileUnit(); this.stubTestNamespace = new CodeNamespace(namespaceName); this.stubCcu.Namespaces.Add(this.stubTestNamespace); this.mainTestType = this.GenerateMainTestClass(unitTestClassName); this.stubTestType = this.GenerateStubTestClass(unitTestClassName); this.mainTestNamespace.Imports.Add(new CodeNamespaceImport("Microsoft.VisualStudio.TestTools.UnitTesting")); this.mainTestNamespace.Imports.Add(new CodeNamespaceImport("System.Collections.Generic")); }