/// <summary> /// Un-assign Regression Test from this suite. /// </summary> /// <param name="regressionTest">Regression Test to un-assign.</param> public void UnassignRegressionTest(RegressionTest regressionTest) { if (!RegressionTests.Contains(regressionTest)) { throw new InvalidOperationException("Suite doesn't have this regression test."); } RegressionTests.Remove(regressionTest); }
/// <summary> /// Assign Regression Test to this suite. /// </summary> /// <param name="regressionTest">Regression Test to assign.</param> public void AssignRegressionTest(RegressionTest regressionTest) { RegressionTests.Add(regressionTest); }
/// <summary> /// Create new Regression Test. /// </summary> /// <param name="name">Regression Test name</param> /// <param name="scope">Regression Test project</param> /// <param name="attributes">Additional attributes that should be set for Environment</param> /// <returns>Newly created Regression Test</returns> public RegressionTest RegressionTest(string name, Project scope, IDictionary<string, object> attributes) { var regressionTest = new RegressionTest(instance) { Name = name, Project = scope }; AddAttributes(regressionTest, attributes); regressionTest.Save(); return regressionTest; }
/// <summary> /// Create new Regression Test based on Test /// </summary> /// <param name="test">Test which we will be used to create Regression Test</param> /// <returns>Newly created Regression Test</returns> public RegressionTest RegressionTest(Test test) { var regressionTest = new RegressionTest(instance) { Description = test.Description, GeneratedFrom = test, Name = test.Name, Project = test.Project }; regressionTest.Type.CurrentValue = test.Type.CurrentValue; foreach(var member in test.Owners) { regressionTest.Owners.Add(member); } regressionTest.Save(); return regressionTest; }