BinaryStudio.ClientManager.WebUi.Tests.Controllers.InquiryControllerTests.Should_ReturnListOfInquiriesForCurrentMonth_WhenMonthRequested C# (CSharp) Метод

Should_ReturnListOfInquiriesForCurrentMonth_WhenMonthRequested() приватный Метод

private Should_ReturnListOfInquiriesForCurrentMonth_WhenMonthRequested ( int month ) : void
month int
Результат void
        public void Should_ReturnListOfInquiriesForCurrentMonth_WhenMonthRequested(int month)
        {
            // arrange
            Clock.FreezedTime = new DateTime(Clock.Now.Year, month, 10);
            var mock = new Mock<IRepository>();
            mock.Setup(x => x.Query<Inquiry>(z => z.Client)).Returns(inquiries.AsQueryable());

            // act
            var inquiriesController = new InquiriesController(mock.Object);
            var viewResult = (MonthViewModel)inquiriesController.Month().Model;

            // assert
            Assert.That(viewResult.Weeks
                .All(x => x.Days
                    .Where(y => y.Inquiries.Any())
                    .All(z => z.Date.Month == month)));
        }