Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void mustLogExceptions()
        public virtual void MustLogExceptions()
        {
            _logMethod.log(_logger, "MESSAGE", new ArithmeticException("EXCEPTION"));
            AssertableLogProvider.MessageMatcher matcher = _logProvider.internalToStringMessageMatcher();
            matcher.AssertContains("MESSAGE");
            matcher.AssertContains("ArithmeticException");
            matcher.AssertContains("EXCEPTION");
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void upgradeShouldGiveProgressMonitorProgressMessages() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void UpgradeShouldGiveProgressMonitorProgressMessages()
        {
            // Given
            PageCache          pageCache          = _pageCacheRule.getPageCache(_fileSystem);
            UpgradableDatabase upgradableDatabase = GetUpgradableDatabase(pageCache);

            // When
            AssertableLogProvider logProvider = new AssertableLogProvider();

            NewUpgrader(upgradableDatabase, pageCache, _allowMigrateConfig, new VisibleMigrationProgressMonitor(logProvider.GetLog("test"))).migrateIfNeeded(_databaseLayout);

            // Then
            AssertableLogProvider.MessageMatcher messageMatcher = logProvider.RawMessageMatcher();
            messageMatcher.AssertContains("Store files");
            messageMatcher.AssertContains("Indexes");
            messageMatcher.AssertContains("Counts store");
            messageMatcher.AssertContains("Successfully finished");
        }