コード例 #1
0
        public void EditAluno_ShouldReturnStatusCode()
        {
            var controller = new AlunosController(new TestUniversityContext());

            var item = GetDemoAluno();

            var result = controller.Edit(item.ID);

            Assert.IsNotNull(result);
        }
コード例 #2
0
        public void GetAluno_ShouldReturnAlunoWithSameID()
        {
            var context = new TestUniversityContext();

            context.Alunos.Add(GetDemoAluno());

            var controller = new AlunosController(context);
            var result     = controller.Edit(3) as ViewResult;

            Assert.IsNotNull(result);
        }