public void Init() { currentStateController = App.Current.StateController; SetupClass.SetUp(); limitationPlayers = new CountLicenseLimitation { Enabled = true, Maximum = 10, RegisterName = "RAPlayers" }; limitationPlayers2 = new CountLicenseLimitation { Enabled = true, Maximum = 20, RegisterName = "RAPlayers" }; limitationTeams = new CountLicenseLimitation { Enabled = true, Maximum = 5, RegisterName = "Teams" }; limitationFeature = new FeatureLicenseLimitation { Enabled = true, RegisterName = "Feature 1" }; limitationFeature2 = new FeatureLicenseLimitation { Enabled = true, RegisterName = "Feature 1" }; limitationFeatureDisabled = new FeatureLicenseLimitation { Enabled = false, RegisterName = "Feature 2" }; mockLicenseManager = new Mock <ILicenseManager> (); mockLicenseStatus = new Mock <ILicenseStatus> (); App.Current.LicenseManager = mockLicenseManager.Object; mockLicenseManager.SetupGet(obj => obj.LicenseStatus).Returns(mockLicenseStatus.Object); mockStateController = new Mock <IStateController> (); mockScreenState = new Mock <IScreenState> (); mockStateController.SetupGet(sc => sc.Current).Returns(mockScreenState.Object); App.Current.StateController = mockStateController.Object; }
public void OneTimeSetUp() { SetupClass.SetUp(); futureProject = Utils.CreateProject(); futureProject.CreationDate = DateTime.Parse("12/12/9999"); pastProject = Utils.CreateProject(); pastProject.CreationDate = DateTime.Parse("12/12/2000"); nowProject = Utils.CreateProject(); nowProject.CreationDate = DateTime.Now; projectList = new List <LMProject> { futureProject, pastProject, nowProject }; notLimitedLimitation = new CountLicenseLimitation { Count = 0, Enabled = false }; limitedLimitation = new CountLicenseLimitation { Count = 0, Enabled = true, Maximum = 1 }; storageMock = new Mock <IStorage> (); App.Current.DatabaseManager = Mock.Of <IStorageManager> (); App.Current.DatabaseManager.ActiveDB = storageMock.Object; }
public void Reset() { SetupClass.SetUp(); try { CoreServices.Stop(); } catch { } }
public void OneTimeSetUp() { SetupClass.SetUp(); Mock <IGUIToolkit> mockGui = new Mock <IGUIToolkit> (); mockGui.SetupGet(g => g.DeviceScaleFactor).Returns(1); App.Current.GUIToolkit = mockGui.Object; }
public void OneTimeSetUp() { SetupClass.SetUp(); Mock <ILicenseLimitationsService> mockLicenseLimitation = new Mock <ILicenseLimitationsService> (); mockLicenseLimitation.Setup(license => license.CanExecute(It.IsAny <string> ())).Returns(true); App.Current.LicenseLimitationsService = mockLicenseLimitation.Object; }
public void Reset() { SetupClass.Initialize(); try { CoreServices.Stop(); } catch { } }
public void OneTimeSetUp() { SetupClass.SetUp(); Mock <IGUIToolkit> mockGuiToolkit = new Mock <IGUIToolkit> (); mockGuiToolkit.Setup(m => m.DeviceScaleFactor).Returns(1); App.Current.GUIToolkit = mockGuiToolkit.Object; eventsFilterController = new Utils.DummyEventsFilterController(); }
public void OneTimeSetUp() { SetupClass.SetUp(); Scanner.ScanReferencedControllers(App.Current.ControllerLocator); mockViewLocator = new Mock <ILocator <IView> > (); mockView = new Mock <IPanel> (); App.Current.ViewLocator = mockViewLocator.Object; mockViewLocator.Setup(vl => vl.Retrieve(PlayEditorState.NAME)).Returns(mockView.Object); }
public void TearDownOnce() { try { File.Delete(file1); File.Delete(file2); } catch { } SetupClass.SetUp(); }
public void FixtureSetup() { SetupClass.SetUp(); Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); // Register the events manager eventsController = new EventsController(); toolsManager = new ToolsManager(); currentLicenseManager = App.Current.LicenseManager; currentLimitationService = App.Current.LicenseLimitationsService; }
public void OneTimeSetUp() { SetupClass.SetUp(); Mock <IGUIToolkit> mockGui = new Mock <IGUIToolkit> (); mockGui.SetupGet(g => g.DeviceScaleFactor).Returns(1); App.Current.GUIToolkit = mockGui.Object; mockDashboardsTemplates = new Mock <ICategoriesTemplatesProvider> (); mockTeamTemplates = new Mock <ITeamTemplatesProvider> (); App.Current.CategoriesTemplatesProvider = mockDashboardsTemplates.Object; App.Current.TeamTemplatesProvider = mockTeamTemplates.Object; teams = new List <Team> { new LMTeam { Name = "1" }, new LMTeam { Name = "2" }, new LMTeam { Name = "3" }, new LMTeam { Name = "4" }, new LMTeam { Name = "5" } }; dashboards = new List <Dashboard> { new LMDashboard { Name = "1" }, new LMDashboard { Name = "2" }, new LMDashboard { Name = "3" }, new LMDashboard { Name = "4" }, new LMDashboard { Name = "5" } }; mockTeamTemplates.SetupGet(tm => tm.Templates).Returns(teams); mockDashboardsTemplates.SetupGet(d => d.Templates).Returns(dashboards); }
public void Delete() { try { foreach (var db in App.Current.DatabaseManager.Databases) { db.Reset(); } Directory.Delete(tmpPath, true); } catch { } CoreServices.Stop(); SetupClass.SetUp(); }
public void OneTimeSetUp() { SetupClass.SetUp(); Mock <IGUIToolkit> mockGuiToolkit = new Mock <IGUIToolkit> (); mockGuiToolkit.Setup(m => m.DeviceScaleFactor).Returns(1); App.Current.GUIToolkit = mockGuiToolkit.Object; eventsFilterController = new LMEventsFilterController(); homeTeam = new LMTeamVM { Model = LMTeam.DefaultTemplate(2) }; awayTeam = new LMTeamVM { Model = LMTeam.DefaultTemplate(3) }; }
public void InitDB() { SetupClass.SetUp(); string dbPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); if (Directory.Exists(dbPath)) { Directory.Delete(dbPath, true); } try { storage = new CouchbaseStorageLongoMatch(dbPath, "test-db"); } catch (Exception ex) { throw ex; } db = storage.Database; }
public void InitDB() { SetupClass.SetUp(); App.Current.DependencyRegistry.Register <IFileStorage, LMDB.FileStorage> (0); string dbPath = Path.Combine(Path.GetTempPath(), "TestDB"); if (Directory.Exists(dbPath)) { Directory.Delete(dbPath, true); } try { storage = new CouchbaseStorageLongoMatch(dbPath, "test-db"); } catch (Exception ex) { throw ex; } db = storage.Database; }
public void InitDB() { SetupClass.SetUp(); string tmpPath = Path.GetTempPath(); string homePath = Path.Combine(tmpPath, "LongoMatch"); string dbPath = Path.Combine(homePath, "db"); if (Directory.Exists(dbPath)) { Directory.Delete(dbPath, true); } Directory.CreateDirectory(tmpPath); Directory.CreateDirectory(homePath); Directory.CreateDirectory(dbPath); storage = new CouchbaseStorageLongoMatch(dbPath, "test-db"); db = ((CouchbaseStorageLongoMatch)storage).Database; // Remove the StorageInfo doc to get more understandable document count results db.GetDocument(Guid.Empty.ToString()).Delete(); Environment.SetEnvironmentVariable("LONGOMATCH_HOME", tmpPath); Environment.SetEnvironmentVariable("LGM_UNINSTALLED", "1"); }
public void SetUpOnce() { SetupClass.SetUp(); }
public void SetUp() { SetupClass.SetUp(); stateControllerMock = new Mock <IStateController> (); App.Current.StateController = stateControllerMock.Object; }
public void TearDown() { SetupClass.SetUp(); }
public void Reset() { SetupClass.SetUp(); }
public void Reset() { SetupClass.Initialize(); }
public void OneTimeSetUp() { SetupClass.SetUp(); }
public void OneTimeSetUp() { SetupClass.SetUp(); mockLimitationService = new Mock <ILicenseLimitationsService> (); App.Current.LicenseLimitationsService = mockLimitationService.Object; }
public void FixtureSetup() { SetupClass.SetUp(); }
public void OneTimeSetUp() { SetupClass.SetUp(); VAS.Drawing.DrawingInit.ScanViews(); }