public bool Filter(object obj) { if (obj is PokemonListItemVm pokemonVm) { if (pokemonVm.IsVisible is false) { return(false); } var values = FilterText.Value.Trim().Split(' ', '\n', ' '); if (values.Length is 0) { return(true); } var targets = new[] { pokemonVm.Name, pokemonVm.Type1, pokemonVm.Type2, pokemonVm.Ability1, pokemonVm.Ability2, pokemonVm.Ability3, }; return(StringAnalizer.ContainByJajp(targets, values)); } return(true); }
public void Test_MaxOfDifferentSimbols() { //Arage string str = "abccbad"; int expected = 4; //act int actual = StringAnalizer.MaxOfDifferentSimbols(str); //acert Assert.AreEqual(expected, actual); }
public void Test_MaxOfLatinSimbols_WhenEmpty() { //Arage string str = "abccbad"; int expected = 2; //act int actual = StringAnalizer.MaxOfIdentialNumbers(str); //acert Assert.AreEqual(expected, actual); }
public void Test_MaxOfIdentialNumbers() { //Arage string str = "abccbad2111"; int expected = 3; //act int actual = StringAnalizer.MaxOfIdentialNumbers(str); //acert Assert.AreEqual(expected, actual); }