Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void storeLayoutForAbsoluteFile()
        internal virtual void StoreLayoutForAbsoluteFile()
        {
            File        storeDir    = _testDirectory.storeDir();
            StoreLayout storeLayout = StoreLayout.Of(storeDir);

            assertEquals(storeDir, storeLayout.StoreDirectory());
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void databaseLayoutForName()
        internal virtual void DatabaseLayoutForName()
        {
            string         databaseName = "testDatabase";
            StoreLayout    storeLayout  = _testDirectory.storeLayout();
            DatabaseLayout testDatabase = DatabaseLayout.Of(storeLayout, databaseName);

            assertEquals(new File(storeLayout.StoreDirectory(), databaseName), testDatabase.DatabaseDirectory());
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void storeLockFileLocation()
        internal virtual void StoreLockFileLocation()
        {
            StoreLayout storeLayout   = _testDirectory.storeLayout();
            File        storeLockFile = storeLayout.StoreLockFile();

            assertEquals("store_lock", storeLockFile.Name);
            assertEquals(storeLayout.StoreDirectory(), storeLockFile.ParentFile);
        }
Esempio n. 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void storeLayoutUseCanonicalRepresentation()
        internal virtual void StoreLayoutUseCanonicalRepresentation()
        {
            Path        basePath         = _testDirectory.storeDir("notCanonical").toPath();
            Path        notCanonicalPath = basePath.resolve("../anotherLocation");
            StoreLayout storeLayout      = StoreLayout.Of(notCanonicalPath.toFile());

            assertEquals(_testDirectory.directory("anotherLocation"), storeLayout.StoreDirectory());
        }
Esempio n. 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void databaseLayoutUseCanonicalRepresentation()
        internal virtual void DatabaseLayoutUseCanonicalRepresentation()
        {
            File           storeDir          = _testDirectory.storeDir("notCanonical");
            Path           basePath          = _testDirectory.databaseDir(storeDir).toPath();
            Path           notCanonicalPath  = basePath.resolve("../anotherDatabase");
            DatabaseLayout databaseLayout    = DatabaseLayout.Of(notCanonicalPath.toFile());
            File           expectedDirectory = StoreLayout.Of(storeDir).databaseLayout("anotherDatabase").databaseDirectory();

            assertEquals(expectedDirectory, databaseLayout.DatabaseDirectory());
        }
Esempio n. 6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void storeLayoutResolvesLinks() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void StoreLayoutResolvesLinks()
        {
            Path        basePath     = _testDirectory.directory().toPath();
            File        storeDir     = _testDirectory.storeDir("notAbsolute");
            Path        linkPath     = basePath.resolve("link");
            Path        symbolicLink = Files.createSymbolicLink(linkPath, storeDir.toPath());
            StoreLayout storeLayout  = StoreLayout.Of(symbolicLink.toFile());

            assertEquals(storeDir, storeLayout.StoreDirectory());
        }
Esempio n. 7
0
 private DatabaseLayout(StoreLayout storeLayout, string databaseName)
 {
     this._storeLayout       = storeLayout;
     this._databaseDirectory = new File(storeLayout.StoreDirectory(), databaseName);
     this._databaseName      = databaseName;
 }
Esempio n. 8
0
 public static DatabaseLayout Of(File rootDirectory, string databaseName)
 {
     return(new DatabaseLayout(StoreLayout.Of(rootDirectory), databaseName));
 }
Esempio n. 9
0
 public static DatabaseLayout Of(StoreLayout storeLayout, string databaseName)
 {
     return(new DatabaseLayout(storeLayout, databaseName));
 }