Exemplo n.º 1
0
        public void RefreshPage()
        {
            NewViewModel();
            _model.CreateGaleShapleyAlgorithm();
            _model.CreateGeneticAlgorithm();

            _viewModel.RefreshPage();
            Assert.AreEqual(2, _viewModel.AlgorithmOptions.Count());
            Assert.IsInstanceOfType(_viewModel.AlgorithmOptions[0], typeof(AlgorithmOptionGaleShapley));
            Assert.IsInstanceOfType(_viewModel.AlgorithmOptions[1], typeof(AlgorithmOptionGenetic));
        }
Exemplo n.º 2
0
        private void NewViewModel()
        {
            _context   = new ModelContext();
            _model     = new AlgorithmModel(_context);
            _viewModel = new AlgorithmViewModel(_model, _context);

            SetupModel setupModel = new SetupModel(_context);

            setupModel.Initialize();
            ParticipantsModel participantsModel = new ParticipantsModel(_context);

            participantsModel.Initialize();
            PreferencesModel preferencesModel = new PreferencesModel(_context);

            preferencesModel.Initialize();

            _viewModel.RefreshPage();
        }