public void SetNoSearchResultCorrectly() { view.SetNoSearchResult(); Assert.IsFalse(view.contentContainer.activeSelf); Assert.IsFalse(view.emptyContainer.activeSelf); Assert.IsFalse(view.loadingAnimationContainer.activeSelf); Assert.IsTrue(view.noSearchResultContainer.activeSelf); }
private void OnSearchResult(List <ISearchInfo> searchInfoLands) { if (landElementViews == null) { return; } using (var iterator = landElementViews.GetEnumerator()) { while (iterator.MoveNext()) { iterator.Current.Value.SetParent(view.GetLandElementsContainer()); iterator.Current.Value.gameObject.SetActive(false); } } for (int i = 0; i < searchInfoLands.Count; i++) { if (!landElementViews.TryGetValue(searchInfoLands[i].id, out LandElementView landView)) { continue; } landView.gameObject.SetActive(true); landView.transform.SetSiblingIndex(i); } if (landElementViews.Count == 0) { SetEmptyOrLoading(); } else if (searchInfoLands.Count == 0) { view.SetNoSearchResult(); } else { view.SetFilled(); } }