public void ShouldReturnSpecialStudent() { var expectedPersonName = BusinessRules.specialKey; // Arrange A.CallTo(() => _personRepository.GetAllPersons()).Returns( new List <Persons> { new Persons { First = "Angelina", MiddleI = expectedPersonName, Last = "Jolie", Students = new Students { Email = "*****@*****.**", } }, new Persons { First = "Brad", MiddleI = "J", Last = "Pitt", Students = new Students { Email = "*****@*****.**", } } } ); // Act var studentsDtos = _studentService.GetAllStudents(); // Assert (FluentAssertions) studentsDtos.Single(pdto => pdto.Special).MiddleI.Should().Be(expectedPersonName); }
// GET: Students1 public ActionResult Index() { return(View(service.GetAllStudents())); }