public void ItShouldGetAverageSalary() { var personRepository = new FeikPersonRepository(); personRepository.Persons.Add(new Person { Salary = 25000 }); personRepository.Persons.Add(new Person { Salary = 50000 }); personRepository.Persons.Add(new Person { Salary = 15000 }); PersonController personController = new PersonController(personRepository); var contentResult = personController.GetAverageSalary() as OkNegotiatedContentResult <decimal>; Assert.IsNotNull(contentResult); Assert.IsNotNull(contentResult.Content); Assert.AreEqual(30000, contentResult.Content); }