public TestResultViewModel(ITestResultService testResultService) { _testResultService = testResultService; _userTestModel = TinyTempCache.Get <Type, UserTestModel>(typeof(UserTestModel)); _testResults = _testResultService.GetResults(new TestKey { UnitName = _userTestModel.UnitName, LessonName = _userTestModel.LessonName }); }
public StartedTestViewModel(ITestService testService, ITestResultService testResultService) { _answers = new Dictionary <string, ICollection <string> >(); _testKey = TinyTempCache.Get <Type, TestKey>(typeof(TestKey)); _testService = testService; _testResultService = testResultService; _userTestModel = _testService.GetTestByTaskDescriptionWithPermution(_testKey); _timer = _userTestModel.Duration; NextQuestion = new RelayCommand(ShowNextQuestion); TestResult = new RelayCommand(ShowTestResult); Back = new RelayCommand(ShowBack); Reset(); StartTimer(); }