public void Super()
        {
            var epic1   = EntityFactory.CreateEpic("Epic test 1", SandboxProject);
            var subEpic = EntityFactory.Create(epic1.GenerateChildEpic);

            Assert.AreEqual(epic1, subEpic.Super);
        }
        public void DefaultRankOrder()
        {
            var epic1 = EntityFactory.CreateEpic("Epic test 1", SandboxProject);
            var epic2 = EntityFactory.CreateEpic("Epic test 2", SandboxProject);

            Assert.IsTrue(epic1.RankOrder.IsAbove(epic2));
        }
        public void CannotGenerateChildStory()
        {
            var epic = EntityFactory.CreateEpic("Epic test", SandboxProject);

            epic.Close();
            Assert.IsFalse(epic.CanGenerateChildStory);
        }
        public void RiskLessThanLowerLimit()
        {
            const double value = -0.4;
            var          epic  = EntityFactory.CreateEpic("Epic test", SandboxProject);

            epic.Risk = value;
            epic.Save();
        }
        public void RiskGreaterThanUpperLimit()
        {
            const double value = 10.5;
            var          epic  = EntityFactory.CreateEpic("Epic test", SandboxProject);

            epic.Risk = value;
            epic.Save();
        }
        public void TestValidObjectWrongType()
        {
            Epic  epic   = EntityFactory.CreateEpic("test epic", SandboxProject);
            Story testMe = Instance.Get.StoryByID(epic.ID);

            Assert.IsNull(testMe);
//            _server.Get.StoryByID(AssetID.FromToken("Epic:1448"));  /// oid is correct for epic
            /// expected result if null
        }
        public void UpdateRankOrder()
        {
            var epic1 = EntityFactory.CreateEpic("Epic test 1", SandboxProject);
            var epic2 = EntityFactory.CreateEpic("Epic test 2", SandboxProject);

            epic1.RankOrder.SetBelow(epic2);
            epic1.Save();

            Assert.IsTrue(epic2.RankOrder.IsAbove(epic1));
        }
        public void NullValue()
        {
            var epic = EntityFactory.CreateEpic("Epic test", SandboxProject);

            epic.Value = null;
            epic.Save();

            var actualEpic = Instance.Get.EpicByID(epic.ID);

            Assert.AreEqual(null, actualEpic.Value);
        }
        public void TestAsEpicChildren()
        {
            var epic = EntityFactory.CreateEpic("Epic test 1", SandboxProject);
            var test = EntityFactory.CreateTest("test for epic", epic);

            ResetInstance();

            var actualEpic = Instance.Get.EpicByID(epic.ID);

            Assert.AreEqual(test, First(actualEpic.GetChildTests(null)));
        }
        public void Value()
        {
            const double value = 11.2;
            var          epic  = EntityFactory.CreateEpic("Epic test", SandboxProject);

            epic.Value = value;
            epic.Save();

            var actualEpic = Instance.Get.EpicByID(epic.ID);

            Assert.AreEqual(value, actualEpic.Value);
        }
        public void Swag()
        {
            const double swag = 10.5;
            var          epic = EntityFactory.CreateEpic("Epic test", SandboxProject);

            epic.Swag = swag;
            epic.Save();

            ResetInstance();

            var actualEpic = Instance.Get.EpicByID(epic.ID);

            Assert.AreEqual(swag, actualEpic.Swag);
        }
        public void BlockingIssue()
        {
            var issue = EntityFactory.Create(() => Instance.Create.Issue("Test issue", SandboxProject));
            var epic  = EntityFactory.CreateEpic("test epic", SandboxProject);

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

            ResetInstance();

            var actualEpic = Instance.Get.EpicByID(epic.ID);

            Assert.AreEqual(1, actualEpic.BlockingIssues.Count);
            CollectionAssert.Contains(actualEpic.BlockingIssues, issue);
        }
예제 #13
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));
        }
        public void MoveTestFromStoryToEpic()
        {
            var epic  = EntityFactory.CreateEpic("epic", SandboxProject);
            var story = EntityFactory.CreateEpic("story", SandboxProject);

            var test = EntityFactory.CreateTest("test for story", story);

            ResetInstance();

            var tests         = story.GetChildTests(null);
            var testFromStory = First(tests);

            testFromStory.Parent = epic;
            testFromStory.Save();

            ResetInstance();

            var testsFromEpic = epic.GetChildTests(null);

            Assert.AreEqual(1, testsFromEpic.Count);
            Assert.AreEqual(test, First(testsFromEpic));
        }
        public void MoveTestFromOneEpicToAnother()
        {
            var epic1 = EntityFactory.CreateEpic("first epic", SandboxProject);
            var epic2 = EntityFactory.CreateEpic("second epic", SandboxProject);

            var test = EntityFactory.CreateTest("test for epic", epic1);

            ResetInstance();

            var tests             = epic1.GetChildTests(null);
            var testFromFirstEpic = First(tests);

            testFromFirstEpic.Parent = epic2;
            testFromFirstEpic.Save();

            ResetInstance();

            var testsFromSecondEpic = epic2.GetChildTests(null);

            Assert.AreEqual(1, testsFromSecondEpic.Count);
            Assert.AreEqual(test, First(testsFromSecondEpic));
        }
        public void CanGenerateChildStory()
        {
            Epic epic = EntityFactory.CreateEpic("Epic test", SandboxProject);

            Assert.IsTrue(epic.CanGenerateChildStory);
        }