public void TestHideTilesAndShuffleRandomiseTilesWithoutAddingOrRemoving() { PairsGameViewModel vm = new PairsGameViewModel(dependencyService); int tilesCount = vm.PairsTileItems.Count; vm.HideExistingTilesAndShuffle(); Assert.AreEqual(tilesCount, vm.PairsTileItems.Count); }
public void TestHideTilesAndShuffleHidesTiles() { PairsGameViewModel vm = new PairsGameViewModel(dependencyService); vm.PairsTileItems[5].FrontShown = true; vm.RandomNumberGenerator = x => 0; //change the random generator to not move tiles. vm.HideExistingTilesAndShuffle(); Assert.IsFalse(vm.PairsTileItems[5].FrontShown); }