Edit() private method

private Edit ( GetSkills.Models.StoryIndexViewModel editView ) : Task
editView GetSkills.Models.StoryIndexViewModel
return Task
コード例 #1
0
        public async Task SuccessStoryController_Edit_Test10()
        {
            // Initialization
            SuccessStoryController ctl = new SuccessStoryController();

            // To test if it is null
            var result = await ctl.Edit(101);
            Assert.IsNotNull(result);

            // To test if it is a HttpNotFoundResult when the id is invalid
            Assert.IsInstanceOfType(result, typeof(HttpNotFoundResult));
        }
コード例 #2
0
        public void SuccessStoryController_Edit_Test11()
        {
            // Initialization
            SuccessStoryController ctl = new SuccessStoryController();
            StoryIndexViewModel editView = new StoryIndexViewModel();

            // To test if it is null
            var result = ctl.Edit(editView);
            Assert.IsNotNull(result);
        }
コード例 #3
0
        public async Task SuccessStoryController_Edit_Test03()
        {
            // Initialization
            SuccessStoryController ctl = new SuccessStoryController();

            // To test if it is null
            var result = await ctl.Edit(31);
            // Assert.IsNotNull(result);

            // To test if it is a valid id
            // var model = (StoryIndexViewModel)((ViewResult)result).Model;
            // Assert.IsNotNull(model);
        }