public void InitializelocalFields() { serverURL = generalSection["ServerURL"]; jsonMediaType = generalSection["JSONMediaType"]; xmlMediaType = generalSection["XMLMediaType"]; jsonFormatParameter = generalSection["JSONFormatParameter"]; xmlFormatParameter = generalSection["XMLFormatParameter"]; pageSizeSegment = generalSection["PageSizeSegment"]; pageNumberSegment = generalSection["PageNumberSegment"]; expectedResultCount = int.Parse(generalSection["ExpectedResultCount"]); keyValueSegment = generalSection["KeyValueSegment"]; countrySegment = generalSection["CountrySegment"]; expectedCountryName = countrySection["CountryName"]; expectedCountryGeonameId = Convert.ToInt64(countrySection["CountryGeonameId"]); clientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; client = new HttpClient(clientHandler); continentControllerSegment = continentSection["ContinentControllerSegment"]; expectedContinentName = continentSection["ContinentName"]; expectedContinentGeonameId = long.Parse(continentSection["ContinentGeonameId"]); expectedContinentCodeId = continentSection["ContinentCodeId"]; continentControllerObject = new ContinentController(new ContinentSQLRepository(config)); }
public void CleanUpLocalFields() { serverURL = string.Empty; jsonMediaType = string.Empty; xmlMediaType = string.Empty; jsonFormatParameter = string.Empty; xmlFormatParameter = string.Empty; keyValueSegment = string.Empty; pageNumberSegment = string.Empty; pageSizeSegment = string.Empty; expectedResultCount = int.MinValue; countrySegment = string.Empty; expectedCountryName = string.Empty; expectedCountryGeonameId = null; clientHandler = null; client = null; continentControllerSegment = string.Empty; expectedContinentName = string.Empty; expectedContinentGeonameId = null; expectedContinentCodeId = string.Empty; continentControllerObject = null; }
public Api_Continent_Test() { this._mockLogger = new Mock <ILogger <ContinentController> >(); this.continentController = new ContinentController(_mockLogger.Object); }