BinaryStudio.TaskManager.Logic.Tests.NewsProcessorTests.Should_AddCorrectNews_WithHumanTaskHistoryAsParametr C# (CSharp) Method

Should_AddCorrectNews_WithHumanTaskHistoryAsParametr() private method

        public void Should_AddCorrectNews_WithHumanTaskHistoryAsParametr()
        {
            // arrange 
            User user = new User
                            {
                                UserName = "UserName",
                                Id = 2
                            };
            HumanTaskHistory taskHistory = new HumanTaskHistory
                                               {
                                                   Id = 1,
                                                   Action = "Create",
                                               };
            News news = new News
                            {
                                HumanTaskHistory = taskHistory,
                                HumanTaskHistoryId = taskHistory.Id,
                                Id = 1,
                                IsRead = false,
                                User = user,
                                UserId = user.Id
                            };
            // act

            this.newsProcessor.AddNews(taskHistory, user);

            // assert
            this.newsRepositoryMock.Verify(mock => mock.AddNews(It.Is<News>(x => 
                x.HumanTaskHistoryId == taskHistory.Id
                && x.UserId == user.Id
                && x.User == user
                && x.HumanTaskHistory == taskHistory)), 
                Times.Once());
        }