public void GetTest()
        {
            var studentModels = new List<StudentModel>();

            var httpServer = new InMemoryHttpServer("http://localhost:4728/");
            var response = httpServer.CreateGetRequest("api/students");

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            Assert.IsNotNull(response.Content);
        }
        public void GetTest()
        {
            var schoolModels = new List <SchoolModel>();

            var httpServer = new InMemoryHttpServer("http://localhost:4728/");
            var response   = httpServer.CreateGetRequest("api/school");

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            Assert.IsNotNull(response.Content);
        }
        public void GetByIdTest()
        {
            PostTest();

            var httpServer = new InMemoryHttpServer("http://localhost:4728/");
            var response   = httpServer.CreateGetRequest("api/school");

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            Assert.IsNotNull(response.Content);

            var contentString = response.Content.ReadAsStringAsync().Result;
            var model         = JsonConvert.DeserializeObject <SchoolModel>(contentString);

            Assert.IsTrue(model.Id == 1);
        }
        public void GetByIdTest()
        {
            PostTest();

            var httpServer = new InMemoryHttpServer("http://localhost:4728/");
            var response = httpServer.CreateGetRequest("api/school");

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            Assert.IsNotNull(response.Content);

            var contentString = response.Content.ReadAsStringAsync().Result;
            var model = JsonConvert.DeserializeObject<SchoolModel>(contentString);

            Assert.IsTrue(model.Id == 1);
        }