SetupStaticFdoProperties() public static method

Setup static FDO properties
public static SetupStaticFdoProperties ( ) : void
return void
Exemplo n.º 1
0
        public void StartFwRemoteDatabaseConnector()
        {
            FdoTestHelper.SetupStaticFdoProperties();
            m_sharedProject = true;
            RemotingServer.Start(FwDirectoryFinder.RemotingTcpServerConfigFile, FwDirectoryFinder.FdoDirectories, () => m_sharedProject, v => m_sharedProject = v);

            var connectString = String.Format("tcp://{0}:{1}/FwRemoteDatabaseConnector.Db4oServerInfo",
                                              "localhost", Db4OPorts.ServerPort);

            m_db4OServerInfo = (Db4oServerInfo)Activator.GetObject(typeof(Db4oServerInfo), connectString);
        }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 protected void SetupEverythingButBase()
 {
     if (m_cache != null)
     {
         DisposeEverythingButBase();
     }
     // We need FieldWorks here to get the correct registry key HKLM\Software\SIL\FieldWorks.
     // The default without this would be HKLM\Software\SIL\SIL FieldWorks, which breaks some tests.
     RegistryHelper.ProductName = "FieldWorks";
     FdoTestHelper.SetupStaticFdoProperties();
     m_cache         = CreateCache();
     m_actionHandler = m_cache.ServiceLocator.GetInstance <IActionHandler>();
 }
Exemplo n.º 3
0
        public void StartFwRemoteDatabaseConnector()
        {
            // Change the Project Directory to some temporary directory to ensure, other units tests don't add projects
            // which would slow these tests down.
            m_oldProjectDirectory = FwDirectoryFinder.ProjectsDirectory;
            FwDirectoryFinder.ProjectsDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
            Directory.CreateDirectory(FwDirectoryFinder.ProjectsDirectory);

            FdoTestHelper.SetupStaticFdoProperties();

            m_projectShared = false;
            RemotingServer.Start(FwDirectoryFinder.RemotingTcpServerConfigFile, FwDirectoryFinder.FdoDirectories, () => m_projectShared, v => m_projectShared = v);

            var connectString = String.Format("tcp://{0}:{1}/FwRemoteDatabaseConnector.Db4oServerInfo",
                                              "127.0.0.1", Db4OPorts.ServerPort);

            m_db4OServerInfo = (Db4oServerInfo)Activator.GetObject(typeof(Db4oServerInfo), connectString);

            // Arbitrary method call to ensure db4oServerInfo is created on server.
            m_db4OServerInfo.AreProjectShared();

            m_progress = new DummyProgressDlg();
        }