Esempio n. 1
0
        public void AddDeliverableToIterationTest()
        {
            // Arrange
            var iteration = new IterationMother().Build();
            var deliverable = new DeliverableMother().Build();
            var originalCount = iteration.GetDeliverables().Count();
            var expectedCount = 1;

            // Act
            iteration.AddDeliverable(deliverable);
            var actual = iteration.GetDeliverable(deliverable.Id);
            var actualCount = iteration.GetDeliverables().Count();

            // Assert
            Assert.IsNotNull(actual);
            Assert.AreEqual(expectedCount, actualCount);
            Assert.AreNotEqual(originalCount, actualCount);
        }
Esempio n. 2
0
        public void AddIterationToProjectTest()
        {
            // Arrange
            var project = new ProjectMother().Build();
            var iteration = new IterationMother().Build();
            var originalCount = project.GetIterations().Count();
            var expectedCount = 1;

            // Act
            project.AddIteration(iteration);
            var actual = project.GetIteration(iteration.Id);
            var actualCount = project.GetIterations().Count();

            // Assert
            Assert.IsNotNull(actual);
            Assert.AreEqual(expectedCount, actualCount);
            Assert.AreNotEqual(originalCount, actualCount);
        }
Esempio n. 3
0
        public void AddExistantDeliverableAgainShouldFail()
        {
            // Arrange
            var iteration = new IterationMother().Build();
            var deliverable = new DeliverableMother().Build();
            var expectedCount = 1;

            // Act
            try
            {
                iteration.AddDeliverable(deliverable);
                iteration.AddDeliverable(deliverable);
            }
            catch (Exception)
            {
                var actualCount = iteration.GetDeliverables().Count();
                Assert.AreEqual(expectedCount, actualCount);
                throw;
            }
        }
Esempio n. 4
0
        public void AssignExistingMemberToIterationShouldFail()
        {
            // Arrange
            var iteration = new IterationMother().Build();
            var teamMember = new TeamMemberMother().Build();
            var expectedCount = 1;

            // Act
            try
            {
                iteration.AssignTeamMember(teamMember);
                iteration.AssignTeamMember(teamMember);
            }
            catch (Exception)
            {
                var actualCount = iteration.GetAssignedMembers().Count();

                // Assert
                Assert.AreEqual(expectedCount, actualCount);
                throw;
            }
        }
Esempio n. 5
0
        public void AssignMemberToIterationTest()
        {
            // Arrange
            var iteration = new IterationMother().Build();
            var teamMember = new TeamMemberMother().Build();
            var originalCount = iteration.GetAssignedMembers().Count();
            var expectedCount = 1;

            // Act
            iteration.AssignTeamMember(teamMember);
            var actual = iteration.GetAssignedMember(teamMember.Id);
            var actualCount = iteration.GetAssignedMembers().Count();

            // Assert
            Assert.IsNotNull(actual);
            Assert.AreEqual(expectedCount, actualCount);
            Assert.AreNotEqual(originalCount, actualCount);
        }
Esempio n. 6
0
        public void UnassignInexistentTeamMemberShouldFail()
        {
            // Arrange
            var iteration = new IterationMother().Build();
            var teamMember = new TeamMemberMother().Build();

            // Act
            iteration.UnassignTeamMember(teamMember.Id);
        }
Esempio n. 7
0
        public void RemoveInexistentDeliverableShouldFail()
        {
            // Arrange
            var iteration = new IterationMother().Build();
            var deliverable = new DeliverableMother().Build();

            // Act
            iteration.RemoveDeliverable(deliverable.Id);
        }