use of org.eclipse.jnosql.mapping.DatabaseMetadata in project jnosql-diana by eclipse.
the class DatabaseMetadataTest method shouldReturnToString2.
@Test
public void shouldReturnToString2() {
Database database = Mockito.mock(Database.class);
Mockito.when(database.value()).thenReturn(DatabaseType.COLUMN);
DatabaseMetadata metadata = DatabaseMetadata.of(database);
assertEquals("COLUMN", metadata.toString());
}
use of org.eclipse.jnosql.mapping.DatabaseMetadata in project jnosql-diana by eclipse.
the class DatabaseMetadataTest method shouldReturnToString.
@Test
public void shouldReturnToString() {
Database database = Mockito.mock(Database.class);
Mockito.when(database.value()).thenReturn(DatabaseType.COLUMN);
Mockito.when(database.provider()).thenReturn("column");
DatabaseMetadata metadata = DatabaseMetadata.of(database);
assertEquals("COLUMN@column", metadata.toString());
}
use of org.eclipse.jnosql.mapping.DatabaseMetadata in project jnosql-diana by eclipse.
the class DatabaseMetadataTest method shouldReturnMetadata.
@Test
public void shouldReturnMetadata() {
Database database = Mockito.mock(Database.class);
Mockito.when(database.value()).thenReturn(DatabaseType.COLUMN);
Mockito.when(database.provider()).thenReturn("column");
DatabaseMetadata metadata = DatabaseMetadata.of(database);
assertEquals(DatabaseType.COLUMN, metadata.getType());
assertEquals("column", metadata.getProvider());
}
Aggregations