public void ShouldReturnFullStateNameFromPrefix() { //Arrange bool result = true; LocationModel model = new LocationModel(new FakeUnitOfWork()); //Act IList<CS_State> states = model.ListAllStatesByName("New"); for (int i = 0; i < states.Count; i++) { if (!states[i].Name.ToLower().Contains("new")) { result = false; break; } } //Assert Assert.IsTrue(result); }
/// <summary> /// List all active States /// </summary> public void ListStatesByName() { try { using (_locationModel = new LocationModel()) { _view.StateList = _locationModel.ListAllStatesByName(_view.FilterText); } } catch (Exception ex) { Logger.Write(string.Format("An Error has ocurred while trying to load the State Information!\n{0}\n{1}", ex.Message, ex.StackTrace)); } }