public void EditAluno_ShouldReturnStatusCode() { var controller = new AlunosController(new TestUniversityContext()); var item = GetDemoAluno(); var result = controller.Edit(item.ID); Assert.IsNotNull(result); }
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); }
public void CreateAluno_ShouldReturnSameAluno() { var controller = new AlunosController(new TestUniversityContext()); var item = GetDemoAluno(); var result = controller.Create(item); Assert.IsNotNull(result); }
public void DeleteAluno_ShouldReturnOK() { var context = new TestUniversityContext(); var item = GetDemoAluno(); context.Alunos.Add(item); var controller = new AlunosController(context); var result = controller.Delete(3); Assert.IsNotNull(result); }