public void CreateConfiguration() { GKManager.DeviceLibraryConfiguration = new GKDeviceLibraryConfiguration(); GKManager.DeviceConfiguration = new GKDeviceConfiguration(); var systemDriver = GKManager.Drivers.FirstOrDefault(x => x.DriverType == GKDriverType.System); Assert.IsNotNull(systemDriver); var systemDevice = GKManager.DeviceConfiguration.RootDevice = new GKDevice { Driver = systemDriver, DriverUID = systemDriver.UID }; gkDevice1 = GKManager.AddDevice(systemDevice, GKManager.Drivers.FirstOrDefault(x => x.DriverType == GKDriverType.GK), 0); kauDevice11 = GKManager.AddDevice(gkDevice1, GKManager.Drivers.FirstOrDefault(x => x.DriverType == GKDriverType.RSR2_KAU), 1); kauDevice12 = GKManager.AddDevice(gkDevice1, GKManager.Drivers.FirstOrDefault(x => x.DriverType == GKDriverType.RSR2_KAU), 2); gkDevice2 = GKManager.AddDevice(systemDevice, GKManager.Drivers.FirstOrDefault(x => x.DriverType == GKDriverType.GK), 0); kauDevice21 = GKManager.AddDevice(gkDevice2, GKManager.Drivers.FirstOrDefault(x => x.DriverType == GKDriverType.RSR2_KAU), 1); kauDevice22 = GKManager.AddDevice(gkDevice2, GKManager.Drivers.FirstOrDefault(x => x.DriverType == GKDriverType.RSR2_KAU), 2); GKManager.UpdateConfiguration(); ClientManager.PlansConfiguration = new PlansConfiguration(); ClientManager.PlansConfiguration.AllPlans = new List<Plan>(); ServiceFactory.Initialize(null, null); ServiceFactory.ResourceService = new MockResourceService(); ServiceFactory.DialogService = MockDialogService = new MockDialogService(); ServiceFactory.MessageBoxService = MockMessageBoxService = new MockMessageBoxService(); ServiceFactory.MenuService = new MenuService(x => { ;}); ServiceFactory.RibbonService = new MockRibbonService(); CreateGroupControllerModule(); }
public void Initialize() { CreateConfiguration(); ServiceFactory.Initialize(null, null); ServiceFactory.ResourceService = new MockResourceService(); ServiceFactory.DialogService = MockDialogService = new MockDialogService(); ServiceFactory.MessageBoxService = MockMessageBoxService = new MockMessageBoxService(); ServiceFactory.MenuService = new MenuService(x => {; }); ServiceFactory.RibbonService = new MockRibbonService(); }