public MainWindowVM(IMenuVM menuVM, IQuestionVM questionVM, ISummaryVM summaryVM, IHighscoreVM highscoreVM) { _questionVM = questionVM; _summaryVM = summaryVM; _highscoreVM = highscoreVM; _menuVM = menuVM; _questionVM.QuestionsFinished += QuestionVMQuestionsFinished; _menuVM.OpenDictionaryRequested += MenuVMOpenDictionaryRequested; _summaryVM.UploadFinished += SummaryVMUploadFinished; _highscoreVM.ReturnToMenuRequested += HighscoreVMReturnToMenuRequested; Content = _menuVM; }
public void Initialize() { _currentHighscore = CreateCurrentHighscore(); var highscores = new List <Highscore> { CreateHighscore(_userFrank, _testDictionary, 80), CreateHighscore(_userMyself, _testDictionary, 50), CreateHighscore(_userSandra, _testDictionary, 40), CreateHighscore(_userSandra, _testDictionary, 70), CreateHighscore(_userMyself, new Dictionary("dict2", null), 20), _currentHighscore, CreateHighscore(_userFrank, _testDictionary, 30), CreateHighscore(_userFrank, _testDictionary, 60) }; _repositoryMock = new Mock <IRepository>(); _repositoryMock.Setup(p => p.GetAll <Highscore>()).Returns(highscores); _objectUnderTest = new HighscoreVM(_repositoryMock.Object); }
public void Initialize() { _currentHighscore = CreateCurrentHighscore(); var highscores = new List<Highscore> { CreateHighscore("Frank", _testDictionary, 80), CreateHighscore("Myself", _testDictionary, 50), CreateHighscore("Sandra", _testDictionary, 40), CreateHighscore("Sandra", _testDictionary, 70), CreateHighscore("Myself", new Dictionary("dict2", null), 20), _currentHighscore, CreateHighscore("Frank", _testDictionary, 30), CreateHighscore("Frank", _testDictionary, 60) }; _repositoryMock = new Mock<IRepository>(); _repositoryMock.Setup(p => p.GetAllHighscores(_testDictionary.Id)).Returns(highscores); _objectUnderTest = new HighscoreVM(_repositoryMock.Object, new ScoreCalculator()); }
public void Initialize() { _currentHighscore = CreateCurrentHighscore(); var highscores = new List <Highscore> { CreateHighscore("Frank", _testDictionary, 80), CreateHighscore("Myself", _testDictionary, 50), CreateHighscore("Sandra", _testDictionary, 40), CreateHighscore("Sandra", _testDictionary, 70), CreateHighscore("Myself", new Dictionary("dict2", null), 20), _currentHighscore, CreateHighscore("Frank", _testDictionary, 30), CreateHighscore("Frank", _testDictionary, 60) }; _repositoryMock = new Mock <IRepository>(); _repositoryMock.Setup(p => p.GetAllHighscores(_testDictionary.Id)).Returns(highscores); _objectUnderTest = new HighscoreVM(_repositoryMock.Object, new ScoreCalculator()); }
public MainWindowVM( IMenuVM menuVM, IQuestionVM questionVM, ICompetitionSummaryVM competitionSummaryVM, IPracticeSummaryVM practiceSummaryVM, IHighscoreVM highscoreVM) { _questionVM = questionVM; _competitionSummaryVM = competitionSummaryVM; _practiceSummaryVM = practiceSummaryVM; _highscoreVM = highscoreVM; _menuVM = menuVM; _questionVM.QuestionsFinished += QuestionVMQuestionsFinished; _menuVM.StartCompetitionRequested += MenuVMStartCompetitionRequested; _menuVM.StartPracticeRequested += MenuVMStartPracticeRequested; _competitionSummaryVM.UploadFinished += CompetitionSummaryVMUploadFinished; _practiceSummaryVM.ReturnToMenuRequested += PracticeSummaryVMReturnToMenuRequested; _highscoreVM.ReturnToMenuRequested += HighscoreVMReturnToMenuRequested; Content = _menuVM; }