//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void logConstraintJobProgress() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void LogConstraintJobProgress() { // Given CreateNode(map(_name, "irrelephant"), _first); AssertableLogProvider logProvider = new AssertableLogProvider(); FlippableIndexProxy index = mock(typeof(FlippableIndexProxy)); when(index.State).thenReturn(InternalIndexState.POPULATING); IndexPopulator populator = spy(IndexPopulator(false)); try { IndexPopulationJob job = NewIndexPopulationJob(populator, index, _indexStoreView, logProvider, EntityType.NODE, IndexDescriptor(_first, _name, true)); // When job.Run(); // Then AssertableLogProvider.LogMatcherBuilder match = inLog(typeof(IndexPopulationJob)); logProvider.AssertExactly(match.info("Index population started: [%s]", ":FIRST(name)"), match.info("Index created. Starting data checks. Index [%s] is %s.", ":FIRST(name)", "POPULATING"), match.info(containsString("TIME/PHASE Final: SCAN["))); } finally { populator.Close(true); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldLogUserReadableLabelAndPropertyNames() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldLogUserReadableLabelAndPropertyNames() { //noinspection deprecation GraphDatabaseAPI db = DbRule.GraphDatabaseAPI; string labelName = "User"; string property = "name"; // when CreateIndex(db, labelName, property); // then AssertableLogProvider.LogMatcherBuilder match = inLog(typeof(IndexPopulationJob)); IndexProviderMap indexProviderMap = Db.DependencyResolver.resolveDependency(typeof(IndexProviderMap)); IndexProvider defaultProvider = indexProviderMap.DefaultProvider; IndexProviderDescriptor providerDescriptor = defaultProvider.ProviderDescriptor; _logProvider.assertAtLeastOnce(match.info("Index population started: [%s]", ":User(name) [provider: {key=" + providerDescriptor.Key + ", version=" + providerDescriptor.Version + "}]")); assertEventually((ThrowingSupplier <object, Exception>)() => null, new LogMessageMatcher(this, match, providerDescriptor), 1, TimeUnit.MINUTES); }
public override bool Matches(object item) { return(outerInstance.logProvider.ContainsMatchingLogCall(Match.info(CREATION_FINISHED, ":User(name) [provider: {key=" + Descriptor.Key + ", version=" + Descriptor.Version + "}]", "ONLINE"))); }