public void RemoveActivityTest() { // Arrange var activity = new TimelineActivityMother().Build(); var timeline = new TimelineMother().Build(); timeline.AddActivity(activity); var originalCount = timeline.GetActivities().Count; const int expectedCount = 0; // Act timeline.RemoveActivity(activity.Id); var actual = timeline.GetActivity(activity.Id); var actualCount = timeline.GetActivities().Count; // Assert Assert.IsNull(actual); Assert.AreEqual(expectedCount, actualCount); Assert.AreNotEqual(originalCount, actualCount); }
public void RemoveInexistentActivityShouldFail() { // Arrange var activity = new TimelineActivityMother().Build(); var timeline = new TimelineMother().Build(); // Act timeline.RemoveActivity(activity.Id); }