public void TestProject_from_pipeline_with_broken_connection() { System.Collections.Generic.List <TestProject> listOfProjects = new System.Collections.Generic.List <TestProject>(); listOfProjects.Add( FakeTestLinkFactory.GetTestProject( "project", "prj", string.Empty)); System.Collections.Generic.List <TestPlan> listOfTestPlans = new System.Collections.Generic.List <TestPlan>(); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan", "notes", true, // active true, // is_public true, // open listOfProjects[0].id)); System.Collections.Generic.List <TestPlan> resultList = getTestPlansFromProjectsInPipeline(listOfProjects, listOfTestPlans, true, false); Assert.AreEqual <System.Collections.Generic.List <TestPlan> >( (new System.Collections.Generic.List <TestPlan>()), resultList); }
public void TestProject_not_specified() { System.Collections.Generic.List <TestProject> listOfProjects = new System.Collections.Generic.List <TestProject>(); listOfProjects.Add( FakeTestLinkFactory.GetTestProject( "project01", "prj", string.Empty)); listOfProjects.Add( FakeTestLinkFactory.GetTestProject( "project02", "prj", string.Empty)); System.Collections.Generic.List <TestPlan> listOfTestPlans = new System.Collections.Generic.List <TestPlan>(); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan 01", "notes", true, // active true, // is_public true, // open listOfProjects[0].id)); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan 02", "notes", true, // active true, // is_public true, // open listOfProjects[1].id)); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan 03", "notes", true, // active true, // is_public true, // open listOfProjects[0].id)); System.Collections.Generic.List <TestPlan> resultList = getTestPlansFromProjectsInPipeline(listOfProjects, listOfTestPlans, false, true); listOfTestPlans.RemoveAt(1); Assert.AreEqual <System.Collections.Generic.List <TestPlan> >( //Assert.AreEqual<Meyn.TestLink.TestPlan>( listOfTestPlans, resultList); }
public void TestProject_from_pipeline_single_name() { System.Collections.Generic.List <TestProject> listOfProjects = new System.Collections.Generic.List <TestProject>(); listOfProjects.Add( FakeTestLinkFactory.GetTestProject( "project", "prj", string.Empty)); System.Collections.Generic.List <TestPlan> listOfTestPlans = new System.Collections.Generic.List <TestPlan>(); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan 01", "notes", true, // active true, // is_public true, // open listOfProjects[0].id)); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan 02", "notes", true, // active true, // is_public true, // open listOfProjects[0].id)); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan 03", "notes", true, // active true, // is_public true, // open listOfProjects[0].id)); System.Collections.Generic.List <TestPlan> resultList = getTestPlansFromProjectsInPipelineByName(listOfProjects, listOfTestPlans, (new string[] { "testplan 02" }), false, false); listOfTestPlans.RemoveAt(2); listOfTestPlans.RemoveAt(0); Assert.AreElementsSameIgnoringOrder <TestPlan>( listOfTestPlans, resultList); }
public void TestProject_by_name() { System.Collections.Generic.List <TestProject> listOfProjects = new System.Collections.Generic.List <TestProject>(); listOfProjects.Add( FakeTestLinkFactory.GetTestProject( "project", "prj", string.Empty)); System.Collections.Generic.List <TestPlan> listOfTestPlans = new System.Collections.Generic.List <TestPlan>(); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan", "notes", true, // active true, // is_public true, // open listOfProjects[0].id)); //cmdlet.WriteTrace(cmdlet, "TestProject_by_name: 0001"); System.Collections.Generic.List <TestPlan> resultList = getTestPlansByProjectName( listOfProjects[0], (new string[1] { listOfProjects[0].name }), listOfTestPlans, false, false); //cmdlet.WriteTrace(cmdlet, "TestProject_by_name: 0002"); Assert.AreEqual <System.Collections.Generic.List <TestPlan> >( //Assert.AreEqual<Meyn.TestLink.TestPlan>( (new System.Collections.Generic.List <TestPlan>()), resultList); //cmdlet.WriteTrace(cmdlet, "TestProject_by_name: 0003"); }
public void TestProjects_from_pipeline() { System.Collections.Generic.List <TestProject> listOfProjects = new System.Collections.Generic.List <TestProject>(); listOfProjects.Add( FakeTestLinkFactory.GetTestProject( "project1", "prj1", string.Empty)); listOfProjects.Add( FakeTestLinkFactory.GetTestProject( "project2", "prj2", string.Empty)); listOfProjects.Add( FakeTestLinkFactory.GetTestProject( "project3", "prj3", string.Empty)); System.Collections.Generic.List <TestPlan> listOfTestPlans = new System.Collections.Generic.List <TestPlan>(); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan1", "notes", true, // active true, // is_public true, // open listOfProjects[0].id)); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan4", "notes", true, // active true, // is_public true, // open 111)); //listOfProjects[2].id)); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan2", "notes", true, // active true, // is_public true, // open listOfProjects[1].id)); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan3", "notes", true, // active true, // is_public true, // open listOfProjects[2].id)); listOfTestPlans.Add( FakeTestLinkFactory.GetTestPlan( "testplan5", "notes", true, // active true, // is_public true, // open 927)); System.Collections.Generic.List <TestPlan> resultList = getTestPlansFromProjectsInPipeline(listOfProjects, listOfTestPlans, false, false); listOfTestPlans.RemoveAt(4); listOfTestPlans.RemoveAt(1); Assert.AreEqual <System.Collections.Generic.List <TestPlan> >( //Assert.AreEqual<Meyn.TestLink.TestPlan>( listOfTestPlans, resultList); }