public void Should_Throw_If_Thread_Is_Null()
            {
                // Given
                AzureDevOpsPullRequestCommentThread thread = null;

                // When
                var result = Record.Exception(() => thread.ToPullRequestDiscussionThread());

                // Then
                result.IsArgumentNullException("thread");
            }
            public void Should_Not_Throw_If_Properties_Are_Null()
            {
                // Given
                var thread =
                    new AzureDevOpsPullRequestCommentThread
                {
                    Id         = 123,
                    Status     = AzureDevOpsCommentThreadStatus.Active,
                    FilePath   = "/foo.cs",
                    Comments   = new List <AzureDevOpsComment>(),
                    Properties = null,
                };

                // When
                var result = thread.ToPullRequestDiscussionThread();

                // Then
                result.CommentSource.ShouldBe(default);
            public void Should_Throw_If_Comments_Are_Null()
            {
                // Given
                var thread =
                    new AzureDevOpsPullRequestCommentThread
                {
                    Id         = 123,
                    Status     = AzureDevOpsCommentThreadStatus.Active,
                    FilePath   = "/foo.cs",
                    Comments   = null,
                    Properties = new Dictionary <string, object>(),
                };

                // When
                var result = Record.Exception(() => thread.ToPullRequestDiscussionThread());

                // Then
                result.IsInvalidOperationException("Comments list is not created.");
            }