示例#1
0
        public void ShouldThrowArgumentNullExceptionWhenCommentIdIsDefaultInGetDescription()
        {
            Guid testedId = default;

            Action testedAction = () => TestedService.GetDescription(testedId);

            ShouldThrowArgumentNullExceptionWhenCommentIdIsDefaultInternal(testedAction);
        }
示例#2
0
        public void ShouldThrowEntityNotFoundExceptionWhenEntityNotFoundByIdInGetDescription()
        {
            Guid   testedId             = Guid.NewGuid();
            string expectedErrorMessage = $"Entity \"Comment\" - \"{testedId}\" not found.";

            Action testedAction = () => TestedService.GetDescription(testedId);

            ShouldThrowEntityNotFoundExceptionWhenEntityNotFoundByIdInternal(testedAction, expectedErrorMessage);
        }
示例#3
0
        public void ShouldReturnDescription()
        {
            string expectedDescription = ReturnedTestedComment.Description;
            Guid   testedId            = Guid.NewGuid();

            string result = TestedService.GetDescription(testedId);

            Assert.NotNull(result);
            Assert.NotEqual(string.Empty, result);
            Assert.Equal(expectedDescription, result);
        }