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); }
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); }
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; } }
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; } }
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); }
public void UnassignInexistentTeamMemberShouldFail() { // Arrange var iteration = new IterationMother().Build(); var teamMember = new TeamMemberMother().Build(); // Act iteration.UnassignTeamMember(teamMember.Id); }
public void RemoveInexistentDeliverableShouldFail() { // Arrange var iteration = new IterationMother().Build(); var deliverable = new DeliverableMother().Build(); // Act iteration.RemoveDeliverable(deliverable.Id); }