Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void migrateValidIndexes() throws java.net.URISyntaxException, ExplicitIndexMigrationException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void MigrateValidIndexes()
        {
            Path indexFolder = CreatePathForResource("indexFolder");
            TrackingLuceneExplicitIndexUpgrader indexUpgrader = new TrackingLuceneExplicitIndexUpgrader(indexFolder);

            indexUpgrader.UpgradeIndexes();

            assertThat(indexUpgrader.MigratedIndexes, Matchers.contains("index1", "index2"));
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void ignoreFoldersWithoutIndexes() throws java.net.URISyntaxException, ExplicitIndexMigrationException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void IgnoreFoldersWithoutIndexes()
        {
            Path indexFolder = CreatePathForResource("notIndexFolder");
            TrackingLuceneExplicitIndexUpgrader indexUpgrader = new TrackingLuceneExplicitIndexUpgrader(indexFolder);

            indexUpgrader.UpgradeIndexes();

            assertTrue(indexUpgrader.MigratedIndexes.Count == 0);
        }
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void pointIncorrectIndexOnMigrationFailure() throws java.net.URISyntaxException, ExplicitIndexMigrationException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void PointIncorrectIndexOnMigrationFailure()
        {
            Path indexFolder = CreatePathForResource("indexFolder");
            TrackingLuceneExplicitIndexUpgrader indexUpgrader = new TrackingLuceneExplicitIndexUpgrader(indexFolder, true);

            ExpectedException.expect(typeof(ExplicitIndexMigrationException));
            ExpectedException.expect(new ExplicitIndexMigrationExceptionBaseMatcher("index1", "index2"));

            indexUpgrader.UpgradeIndexes();
        }