public void ShouldGetRightViewForHeadToHeadView() { //given var recordsController = new RecordsController(_playerRepository.Object, _resultRepository.Object, _mapper.Object); //when var result = recordsController.HeadToHead() as ViewResult; //then Assert.That(result.ViewName, Is.EqualTo("HeadToHead")); }
public void ShouldSetModelWithRightPropertiesForHeadToHead() { //given var recordsController = new RecordsController(_playerRepository.Object, _resultRepository.Object, _mapper.Object); //when var result = recordsController.HeadToHead() as ViewResult; //then var model = (ResultsListModel)result.Model; Assert.That(model, Is.Not.Null); Assert.That(model.PlayerList.First().PlayerName, Is.EqualTo("Hemang")); Assert.That(model.PlayerList.First().PlayerId, Is.EqualTo(1)); }