public void GoCausesNoNavigationForEmptySearch() { ClearAll(); var mockNavigation = CreateMockNavigation(); var viewModel = new HomeViewModel(); var searchTerm = ""; viewModel.SearchText = searchTerm; viewModel.SearchCommand(); Assert.AreEqual(0, mockNavigation.NavigateRequests.Count); }
public void GoCausesNavigationForNonEmptySearch() { ClearAll(); Ioc.RegisterSingleton<IMvxStringToTypeParser>(new MvxStringToTypeParser()); var mockNavigation = CreateMockNavigation(); var viewModel = new HomeViewModel(); var searchTerm = "Test Search Term"; viewModel.SearchText = searchTerm; viewModel.SearchCommand(); Assert.AreEqual(1, mockNavigation.NavigateRequests.Count); }