Beispiel #1
0
        public void EventCreateShouldReturnTheCorrectViewWithCorrectViewModel()
        {
            var controller = new AddEventController(this.eventsServiceMock.Object, this.categoriesServiceMock.Object);

            controller.WithCallTo(x => x.Create())
            .ShouldRenderView("Create")
            .WithModel <CreateViewModel>(
                viewModel =>
            {
                Assert.AreNotEqual(null, viewModel.Categories);
            })
            .AndNoModelErrors();
        }
        private string mUser; //for logout functionality

        public AddEventForm(string user)
        {
            mAEC  = new AddEventController();
            mUser = user;
            InitializeComponent();
        }