public void Post(HttpRequestMessage request, string cityName) { bool found = service.AddCityToProcessingList(cityName); if (!found) { request.CreateResponse(HttpStatusCode.BadRequest); } }
public void TestLoadAllCities() { ClearTestList(); Assert.IsTrue(service.LoadAllCities().Count == 0); service.AddCityToProcessingList(cityNames[0]); service.AddCityToProcessingList(cityNames[1]); service.AddCityToProcessingList(cityNames[2]); Assert.IsTrue(service.LoadAllCities().Count == 3); }