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

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

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

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

            ShouldThrowEntityNotFoundExceptionWhenEntityNotFoundByIdInternal(testedAction, expectedErrorMessage);
        }
Exemple #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);
        }