/// <summary>
        /// Initializes a new <see cref="TestCaseViewModel"/>.
        /// </summary>
        /// <param name="testCase">The backing TFS test case</param>
        /// <param name="automationService">Enables modification of a test case's associated automation</param>
        public TestCaseViewModel(ITestCase testCase, ITestCaseAutomationService automationService)
        {
            _testCase = testCase;
            _automationService = automationService;

            RemoveAutomationCommand = Command.For(this)
                                             .DependsOn(p => p.CanRemoveAutomation)
                                             .Executes(RemoveAutomation);

            _testCase.PropertyChanged += testCase_PropertyChanged;
        }
Example #2
0
        /// <summary>
        /// Initializes a new <see cref="TestCaseViewModel"/>.
        /// </summary>
        /// <param name="testCase">The backing TFS test case</param>
        /// <param name="automationService">Enables modification of a test case's associated automation</param>
        public TestCaseViewModel(ITestCase testCase, ITestCaseAutomationService automationService)
        {
            _testCase          = testCase;
            _automationService = automationService;

            RemoveAutomationCommand = Command.For(this)
                                      .DependsOn(p => p.CanRemoveAutomation)
                                      .Executes(RemoveAutomation);

            _testCase.PropertyChanged += testCase_PropertyChanged;
        }