void CreateGroupControllerModule() { GKManager.UpdateConfiguration(); GroupControllerModule = new GroupControllerModule(); GroupControllerModule.CreateViewModels(); GroupControllerModule.Initialize(); }
void CreateGroupControllerModule() { GroupControllerModule = new GroupControllerModule(); GroupControllerModule.CreateViewModels(); GroupControllerModule.Initialize(); }
public void AllViewModelsTest() { MockDialogService.OnShowModal += x => { var newDeviceViewModel = x as NewDeviceViewModel; newDeviceViewModel.SelectedDriver.Driver = GKManager.Drivers.FirstOrDefault(y => y.DriverType == GKDriverType.RSR2_AM_1); newDeviceViewModel.SaveCommand.Execute(); }; var groupControllerModule = new GroupControllerModule(); groupControllerModule.CreateViewModels(); groupControllerModule.Initialize(); var devicesViewModel = groupControllerModule.DevicesViewModel; devicesViewModel.OnShow(); var selectedDevice = devicesViewModel.SelectedDevice = devicesViewModel.AllDevices.FirstOrDefault(x => x.Driver.DriverType == GKDriverType.RSR2_KAU_Shleif); devicesViewModel.SelectedDevice.AddCommand.Execute(); Assert.That(selectedDevice.Children.Count(), Is.EqualTo(1)); }