private static void GetFullMinicipalInfoByAddressTest(AddressRequest address = null) { var service = new GovernmentService(); if (address == null) { RequestAddress(out address); } //Get Municipal Info var muni = service.GetMunicipalByAddress(address); if (muni == null) { service.DisplayText("Municipal Not Found"); } service.DisplayText($"Municipal: {muni.MunicipalName}"); service.DisplayText("Officials"); //Get Officials var officials = service.GetOfficialsByMunicipalNumber(muni.MunicipalNumber).OrderBy(o => o.FullName).ToList(); officials.ForEach(o => { Console.WriteLine($"{o.Position}: {o.FullName}"); }); Console.ReadLine(); }
private static void GetMunicipalByAddressTest(AddressRequest address = null) { var service = new GovernmentService(); if (address == null) { RequestAddress(out address); } var muni = service.GetMunicipalByAddress(address); if (muni == null) { service.DisplayText("Municipal Not Found"); } service.DisplayText($"Municipal: {muni.MunicipalName}"); Console.ReadLine(); }