示例#1
0
        public void ReturnsCorrectTypeColour_TypeIsString_ReturnsTrue()
        {
            ElementalColours elementalColours = new ElementalColours();
            List <string>    list1            = new List <string>()
            {
                "fire", "water"
            };
            List <string> list2 = new List <string>()
            {
                "fire"
            };

            System.Tuple <string, string> result1 = elementalColours.GetElementalColour(list1);

            Assert.IsTrue(result1.Item1 == elementalColours.typeColour["fire"] && result1.Item2 == elementalColours.typeColour["water"]);

            System.Tuple <string, string> result2 = elementalColours.GetElementalColour(list1);

            Assert.IsTrue(result1.Item1 == elementalColours.typeColour["fire"]);

            System.Tuple <string, string> result3 = elementalColours.GetElementalBackgroundColour(list1);

            Assert.IsTrue(result1.Item1 == elementalColours.typeColour["fire"] && result1.Item2 == elementalColours.typeColour["water"]);

            System.Tuple <string, string> result4 = elementalColours.GetElementalBackgroundColour(list1);

            Assert.IsTrue(result1.Item1 == elementalColours.typeColour["fire"]);
        }
示例#2
0
 public DetailsPageViewModel()
 {
     isShowingAltImage = false;
     isShowingAltBio   = false;
     pkmColour         = new ElementalColours();
     MessagingCenter.Subscribe <MainPageViewModel, PokedexModel>(this, "Send_Selected_Pokemon", (sender, args) => { UpdatePokemonDetails(args); });
     ShowAltEntryCommand = new Command(ShowAltEntry);
     CloseDetailsCommand = new Command(async() => await OnDetailsClosed());
 }