Example #1
0
        public void RemoveActionPlanResource_removes_item()
        {
            // Given
            var testDate = new DateTime(2021, 12, 6);

            A.CallTo(() => clockService.UtcNow).Returns(testDate);
            const int delegateId   = 2;
            const int actionPlanId = 3;

            A.CallTo(() => learningLogItemsDataService.RemoveLearningLogItem(A <int> ._, A <int> ._, A <DateTime> ._))
            .DoesNothing();

            // When
            actionPlanService.RemoveActionPlanResource(actionPlanId, delegateId);

            // Then
            A.CallTo(() => learningLogItemsDataService.RemoveLearningLogItem(actionPlanId, delegateId, testDate))
            .MustHaveHappenedOnceExactly();
        }