Example #1
0
        public void RetrieveTestSetFromChildProjectTest()
        {
            var subProject      = EntityFactory.Create(() => SandboxProject.CreateSubProject("subproject", DateTime.Now));
            var regressionPlan  = EntityFactory.CreateRegressionPlan(RegressionPlanName, subProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite("suite1", regressionPlan);

            var testSet = EntityFactory.Create(() => subProject.CreateTestSet("my test set", regressionSuite));

            ResetInstance();

            var testSetsFromSandboxProject            = SandboxProject.GetTestSets(null);
            var testSetsFromChildProject              = subProject.GetTestSets(null);
            var testSetsFromSandboxProjectAndChildren = SandboxProject.GetTestSets(null, true);

            CollectionAssert.Contains(testSetsFromSandboxProjectAndChildren, testSet);
            CollectionAssert.Contains(testSetsFromChildProject, testSet);
            CollectionAssert.DoesNotContain(testSetsFromSandboxProject, testSet);
        }
Example #2
0
        public void EpicsAssignedToCurrentIssue()
        {
            const string issueName = "Issue name";
            const string epicName  = "Epic Name";

            var issue = EntityFactory.Create(() => Instance.Create.Issue(issueName, SandboxProject));

            var epic = EntityFactory.CreateEpic(epicName, SandboxProject);

            epic.Issues.Add(issue);
            epic.Save();

            ResetInstance();

            var epics = issue.GetEpics(null);

            Assert.AreEqual(1, epics.Count);
            Assert.AreEqual(epic, First(epics));
        }
Example #3
0
        public void IssueOrder()
        {
            var project = SandboxProject;
            var issue1  = EntityFactory.Create(() => project.CreateIssue("Issue 1"));
            var issue2  = EntityFactory.Create(() => project.CreateIssue("Issue 2"));

            var id1 = issue1.ID;
            var id2 = issue2.ID;

            issue1.RankOrder.SetBelow(issue2);

            Assert.IsTrue(issue1.RankOrder.IsBelow(issue2));
            Assert.IsTrue(issue2.RankOrder.IsAbove(issue1));

            ResetInstance();

            issue1 = Instance.Get.IssueByID(id1);
            issue2 = Instance.Get.IssueByID(id2);

            issue1.RankOrder.SetAbove(issue2);

            Assert.IsTrue(issue1.RankOrder.IsAbove(issue2));
            Assert.IsTrue(issue2.RankOrder.IsBelow(issue1));
        }
 private Theme CreateTheme(string themeName, IDictionary <string, object> attributes = null)
 {
     return(EntityFactory.Create(() => Instance.Create.Theme(themeName, SandboxProject, attributes)));
 }
 private Theme CreateSubTheme(Theme theme, string themeName)
 {
     return(EntityFactory.Create(() => theme.CreateChildTheme(themeName)));
 }
Example #6
0
        public void Owner()
        {
            var issue = EntityFactory.Create(() => SandboxProject.CreateIssue("Issue with no Owner"));

            Assert.IsNull(issue.Owner);
        }