Create() публичный Метод

public Create ( ) : IActionResult
Результат IActionResult
        public void CreateReturnsCorrectViewWithCorrectViewModel()
        {
            var sut = new CampaignController(Mock.Of<IMediator>(), null);
            var view = (ViewResult) sut.Create();

            var viewModel = (CampaignSummaryViewModel)view.ViewData.Model;

            Assert.Equal(view.ViewName, "Edit");
            Assert.NotNull(viewModel);
        }
 public void CreateReturnsCorrectViewWithCorrectViewModel()
 {
     var mockMediator = new Mock<IMediator>();
     var controller = new CampaignController(mockMediator.Object, null);
     var view = (ViewResult) controller.Create();
     var viewModel = (CampaignSummaryViewModel)view.ViewData.Model;
     Assert.Equal(view.ViewName, "Edit");
     Assert.NotNull(viewModel);
 }
        public void CreateReturnsCorrectDataOnViewModel()
        {
            var dateTimeNow = DateTime.Now;

            var sut = new CampaignController(null, null) { DateTimeNow = () => dateTimeNow };
            var view = (ViewResult)sut.Create();
            var viewModel = (CampaignSummaryViewModel)view.ViewData.Model;

            Assert.Equal(viewModel.StartDate, dateTimeNow);
            Assert.Equal(viewModel.EndDate, dateTimeNow.AddMonths(1));
        }