public void TestListZipCodeByNameAndCity() { // Arrange LocationModel model = new LocationModel(new FakeUnitOfWork()); // Act IList<CS_ZipCode> result = model.ListZipCodeByNameAndCity(2, "001"); // Assert Assert.IsNotNull(result); Assert.AreEqual(result.Count, 1); }
/// <summary> /// List all active ZipCodes filtered by City and Name (Like) /// </summary> public void ListZipCodesByNameAndCity() { try { using (_locationModel = new LocationModel()) { _view.ZipCodeList = _locationModel.ListZipCodeByNameAndCity(int.Parse(_view.ContextKey), _view.PrefixText); } } catch (Exception ex) { Logger.Write(string.Format("An Error has ocurred while trying to load the Zip Code Information!\n{0}\n{1}", ex.Message, ex.StackTrace)); } }