public ResidenceControllerTests()
 {
     _residents           = new ResidentsInMemory();
     _singleResident      = _residents.Get(2734);
     _residenceController = new ResidenceController(_residents);
 }
        public void Get_Residence_Returns_Correct_Length_Of_Items()
        {
            var result = _residenceController.Get() as OkNegotiatedContentResult <IEnumerable <Residence> >;

            Assert.Equal(_residents.Get().Count(), result.Content.Count());
        }
Esempio n. 3
0
 public IHttpActionResult Get()
 {
     return(Ok(_residents.Get()));
 }