Example #1
0
        public void IfCollectionShuffled_ShouldPass()
        {
            var controller         = new FlagsController();
            var standardCollection = controller.GetAllFlags();
            var shuffledCollection = controller.ShuffleCollection(standardCollection);

            Assert.IsTrue(standardCollection[0].FlagName != shuffledCollection[0].FlagName);
        }
Example #2
0
        public void IfListContainsCurrentFlag_ShouldPass()
        {
            var controller         = new FlagsController();
            var flagsCollection    = controller.GetAllFlags();
            var shuffledCollection = controller.ShuffleCollection(flagsCollection);
            var currentFlag        = controller.GetCurrentFlag(shuffledCollection);
            var countriesList      = controller.GetCountriesForQuiz(shuffledCollection);

            Assert.IsTrue(countriesList.Contains(currentFlag.FlagName));
        }
Example #3
0
        public void IfCollectionNotContainsCurrentFlag_ShouldPass()
        {
            var controller         = new FlagsController();
            var flagsCollection    = controller.GetAllFlags();
            var shuffledCollection = controller.ShuffleCollection(flagsCollection);
            var currentFlag        = controller.GetCurrentFlag(shuffledCollection);

            var quizCollection = controller.CollectionWithoutCurrentFlag(shuffledCollection);

            Debug.WriteLine("Current flasg {0}", currentFlag.FlagName);

            Assert.AreNotEqual(quizCollection.SelectMany(x => x.FlagName), currentFlag.FlagName);
        }