public void DeleteTestVariable()
        {
            string projectName = ClientSampleHelpers.FindAnyProject(this.Context).Name;
            // Get a testplan client instance
            VssConnection      connection     = Context.Connection;
            TestPlanHttpClient testPlanClient = connection.GetClient <TestPlanHttpClient>();

            //Delete the test variable first
            testPlanClient.DeleteTestVariableAsync(projectName, 12).SyncResult();
        }
예제 #2
0
        public void DeleteTestVariable()
        {
            string projectName = ClientSampleHelpers.FindAnyProject(this.Context).Name;
            // Get a testplan client instance
            VssConnection      connection     = Context.Connection;
            TestPlanHttpClient testPlanClient = connection.GetClient <TestPlanHttpClient>();

            TestVariable newVariable;

            Context.TryGetValue <TestVariable>("$newVariable", out newVariable);
            if (newVariable != null)
            {
                int id = newVariable.Id;

                //Delete the test variable
                testPlanClient.DeleteTestVariableAsync(projectName, id).SyncResult();
            }
        }