public void OnViewModelLoad_PresetsExist_PresetsAreLoaded()
        {
            //Arrange
            List <PresetViewModel> mockedPresets = _fixture.Create <List <PresetViewModel> >();

            _presetController.GetAllAsync().Returns(mockedPresets);

            //Act
            _presetControlViewModel = new PresetControlViewModel(_presetController);

            //Assert
            _presetControlViewModel.Presets.ShouldBe(mockedPresets);
        }
示例#2
0
        private void Initialize()
        {
            var presetTask = _presetController.GetAllAsync();

            presetTask.Wait();
            Presets = new ObservableCollection <PresetViewModel>(presetTask.Result);
        }