public void ShouldAddCommentAndReturnNewId() { AddCommentModel model = new() { Message = "TestedMessage" }; Guid result = TestedService.Add(model); Assert.NotEqual(Guid.Empty, result); } }
public void ShouldThrowArgumentNullExceptionWhenAddWithEmptyMessage() { AddCommentModel model = new() { Message = string.Empty }; var exception = Record.Exception( () => TestedService.Add(model) ); Assert.NotNull(exception); Assert.IsType <ArgumentNullException>(exception); }
public void ShouldThrowArgumentNullExceptionWhenEntityIsNull() { TestedDataProviderEntity entity = null; Exception exception = Record.Exception( () => TestedService.Add(entity) ); Assert.NotNull(exception); Assert.IsType <ArgumentNullException>(exception); }