Example #1
0
        public void RemoveCommitmentById_Valid()
        {
            // arrange
            var commitmentId = int.MinValue;
            var removeCommitmentByIdMethodCalled = false;

            _mockDataService.Setup(m => m.RemoveCommitmentById(It.IsAny <int>())).Callback(() => removeCommitmentByIdMethodCalled = true);

            // act
            _disasterService.RemoveCommitmentById(commitmentId);

            // assert
            Assert.IsTrue(removeCommitmentByIdMethodCalled);
        }