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); }
private void Initialize() { var presetTask = _presetController.GetAllAsync(); presetTask.Wait(); Presets = new ObservableCollection <PresetViewModel>(presetTask.Result); }