Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void lookupFileByDatabaseFile()
        internal virtual void LookupFileByDatabaseFile()
        {
            DatabaseLayout layout = _testDirectory.databaseLayout();

            DatabaseFile[] databaseFiles = DatabaseFile.values();
            foreach (DatabaseFile databaseFile in databaseFiles)
            {
                assertNotNull(layout.File(databaseFile).findAny().orElseThrow(() => new Exception("Mapping was expected to be found")));
            }

            File metadata = layout.File(DatabaseFile.MetadataStore).findFirst().orElseThrow(() => new Exception("Mapping was expected to be found"));

            assertEquals("neostore", metadata.Name);
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void lookupIdFileByDatabaseFile()
        internal virtual void LookupIdFileByDatabaseFile()
        {
            DatabaseLayout layout = _testDirectory.databaseLayout();

            DatabaseFile[] databaseFiles = DatabaseFile.values();
            foreach (DatabaseFile databaseFile in databaseFiles)
            {
                Optional <File> idFile = layout.IdFile(databaseFile);
                assertEquals(databaseFile.hasIdFile(), idFile.Present);
            }

            File metadataId = layout.IdFile(DatabaseFile.MetadataStore).orElseThrow(() => new Exception("Mapping was expected to be found"));

            assertEquals("neostore.id", metadataId.Name);
        }
Exemplo n.º 3
0
 public virtual ISet <File> StoreFiles()
 {
     return(Arrays.stream(DatabaseFile.values()).flatMap(this.file).collect(Collectors.toSet()));
 }