コード例 #1
0
        /*******************************************************************/
        public void RefreshInvestigatorsVisibility()
        {
            foreach (CardView cardView in cardsManager.InvestigatorList)
            {
                CardInfo card = investigatorRepository.Get(cardView.Id).Info;
                cardView.Show(CanbeShowed());

                bool CanbeShowed()
                {
                    if (!card.ContainThisText(inputSearch.CurrentText))
                    {
                        return(false);
                    }
                    if (visibilitySwitchView.IsOn)
                    {
                        return(true);
                    }
                    if (!unlockCardsRepository.IsThisCardUnlocked(card))
                    {
                        return(false);
                    }
                    return(true);
                }
            }
        }
コード例 #2
0
        public void ContainText(string textToSearch, bool expected)
        {
            //Arrange
            CardInfo card = new CardInfo()
            {
                Id = "01001", Real_name = "Roland Banks"
            };

            //Act
            bool result = card.ContainThisText(textToSearch);

            //Assert
            Assert.AreEqual(result, expected);
        }