public void TestChoose() { maxCounter = 1; type = TrainingType.Choose; Training training = new Training(dictionary, isSwitched, maxCards, maxCounter, type, learnedBefore); CheckTrainingList(training); // go trough all cards in training and choose cards var currentCard = training.NextCard(); while (currentCard != null) { var chooseList = training.Choose(); CheckChooseList(chooseList, currentCard); currentCard = training.NextCard(); } }
public void TestChooseCardsLessThanType() { maxCounter = 1; type = TrainingType.Choose; Training training = new Training(dictionary, isSwitched, maxCards, maxCounter, type, learnedBefore); CheckTrainingList(training); // set word type as currentCard foreach (var card in dictionary) card.Type = WordType.Noun; var currentCard = training.NextCard(); currentCard.Type = WordType.Verb; for (int i = 0; i < dictionary.Count - 1; i++) dictionary[i].Type = currentCard.Type; var chooseList = training.Choose(cardsToChoose); CheckChooseList(chooseList, currentCard); }
public void TestChooseCards0Type() { maxCounter = 1; type = TrainingType.Choose; Training training = new Training(dictionary, isSwitched, maxCards, maxCounter, type, learnedBefore); CheckTrainingList(training); // all other cards have different type as currentCard foreach (var card in dictionary) card.Type = WordType.Noun; var currentCard = training.NextCard(); currentCard.Type = WordType.Verb; var chooseList = training.Choose(cardsToChoose); CheckChooseList(chooseList, currentCard); }
public void TestChooseCardsMoreThanAvailableType() { maxCounter = 1; type = TrainingType.Choose; Training training = new Training(dictionary, isSwitched, maxCards, maxCounter, type, learnedBefore); CheckTrainingList(training); // set word type as currentCard var currentCard = training.NextCard(); foreach (var card in dictionary) card.Type = currentCard.Type; var chooseList = training.Choose(cardsToChoose); CheckChooseList(chooseList, currentCard); }