public void ShouldDeleteComments() { Guid[] commentIds = new[] { Guid.NewGuid() }; string expectedCommandName = "Delete"; Action testedAction = () => TestedService.Delete(commentIds); ShouldExecuteCommand(testedAction, expectedCommandName, new object[] { commentIds }); }
public void ShouldNotDeleteCommentsWhenCommentIdsContainsOnlyGuidEmptyValues() { Guid[] commentIds = new[] { Guid.Empty }; TestedService.Delete(commentIds); KeyValuePair <string, IEnumerable <object> >?lastCommand = LastCommand; Assert.Null(lastCommand); }
public void ShouldThrowArgumentNullExceptionWhenArgumentIsNull() { Guid[] entityIds = null; Exception exception = Record.Exception( () => TestedService.Delete(entityIds) ); Assert.NotNull(exception); Assert.IsType <ArgumentNullException>(exception); }
public void ShouldThrowArgumentNullExceptionWhenParameterIsNull() { Guid[] commentIds = null; var exception = Record.Exception( () => TestedService.Delete(commentIds) ); Assert.NotNull(exception); Assert.IsType <ArgumentNullException>(exception); }