コード例 #1
0
        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);
        }
コード例 #2
0
        public void RemoveInexistentActivityShouldFail()
        {
            // Arrange
            var activity = new TimelineActivityMother().Build();
            var timeline = new TimelineMother().Build();

            // Act
            timeline.RemoveActivity(activity.Id);
        }