示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void buildContextWithCustomAbsoluteLogFilesLocations() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void BuildContextWithCustomAbsoluteLogFilesLocations()
        {
            File     customLogDirectory      = TestDirectory.directory("absoluteCustomLogDirectory");
            Config   customLogLocationConfig = Config.defaults(logical_logs_location, customLogDirectory.AbsolutePath);
            LogFiles logFiles = builder(TestDirectory.databaseLayout(), _fileSystem).withConfig(customLogLocationConfig).withLogVersionRepository(new SimpleLogVersionRepository()).withTransactionIdStore(new SimpleTransactionIdStore()).build();

            logFiles.Init();
            logFiles.Start();

            assertEquals(customLogDirectory, logFiles.HighestLogFile.ParentFile);
            logFiles.Shutdown();
        }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void buildContextWithCustomLogFilesLocations() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void BuildContextWithCustomLogFilesLocations()
        {
            string         customLogLocation       = "customLogLocation";
            Config         customLogLocationConfig = Config.defaults(logical_logs_location, customLogLocation);
            DatabaseLayout databaseLayout          = TestDirectory.databaseLayout();
            LogFiles       logFiles = builder(databaseLayout, _fileSystem).withConfig(customLogLocationConfig).withLogVersionRepository(new SimpleLogVersionRepository()).withTransactionIdStore(new SimpleTransactionIdStore()).build();

            logFiles.Init();
            logFiles.Start();

            assertEquals(databaseLayout.File(customLogLocation), logFiles.HighestLogFile.ParentFile);
            logFiles.Shutdown();
        }