public async Task AssignmentNotNullAfterAssignDefinitionPageNavigatedToTest()
        {
            var _azureService  = new MockAzureService();
            var _dialogService = new MockPageDialogService();
            await _azureService.SyncOfflineCacheAsync();

            var app       = new App(_azureService);
            var viewModel = new AssignDefinitionPageViewModel(null, _dialogService);

            var assignment = (await(await _azureService.GetTableAsync <Assignment>())
                              .Where(s => s.Name == "Assignment1"))
                             .FirstOrDefault();

            assignment.Exercises = (await(await _azureService.GetTableAsync <Exercise>())
                                    .Where(e => e.Assignment_Id == assignment.Id));

            var navigationParams = new NavigationParameters
            {
                { "model", assignment }
            };

            viewModel.OnNavigatedTo(navigationParams);

            Assert.NotNull(viewModel.Assignment);
        }
        public async Task ExerciceCheckCurrentChangedInAssignDefinitionPageTest()
        {
            var _azureService  = new MockAzureService();
            var _dialogService = new MockPageDialogService();
            await _azureService.SyncOfflineCacheAsync();

            var app       = new App(_azureService);
            var viewModel = new AssignDefinitionPageViewModel(null, _dialogService);

            var assignment = (await(await _azureService.GetTableAsync <Assignment>())
                              .Where(s => s.Name == "Assignment1"))
                             .FirstOrDefault();

            assignment.Exercises = (await(await _azureService.GetTableAsync <Exercise>())
                                    .Where(e => e.Assignment_Id == assignment.Id));

            var navigationParams = new NavigationParameters
            {
                { "model", assignment }
            };

            viewModel.OnNavigatedTo(navigationParams);

            var exerciseBefore = viewModel.CurrentExercise;

            viewModel.SelectedDefinition = viewModel.CurrentExercise.Definition;

            viewModel.CheckCommand.Execute();

            Assert.IsTrue(viewModel.CurrentExercise != exerciseBefore);
        }