public HttpResponseMessage Get(string key)
        {
            PeopleRepository p = new PeopleRepository();
            var result = p.SearchPeople(key);

            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, result);
            return response;
        }
예제 #2
0
        public void Returns_SpecificRows()
        {
            // Arrange
            PeopleRepository p = new PeopleRepository();

            // Act
            List<People_Search.UserDetail>actual = p.SearchPeople("Jay");

            // Assert
            Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(1, actual.Count);
        }
 public PeopleController(PeopleRepository repository)
 {
     this.repository = repository;
 }
 public PeopleController()
 {
     this.repository = new PeopleRepository();
 }