Skip to content

Commit

Permalink
test: fix tests at mapping column
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Mar 2, 2024
1 parent 9b5bb2a commit 5f144e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ public DatabaseManager get() {
+ COLUMN_DATABASE.get()));
DatabaseManager manager = managerFactory.apply(db);

LOGGER.log(Level.FINEST, "Starting a ColumnManager instance using Eclipse MicroProfile Config," +
LOGGER.log(Level.FINEST, "Starting a DatabaseManager instance using Eclipse MicroProfile Config," +
" database name: " + db);
return manager;
}

public void close(@Disposes @Database(DatabaseType.COLUMN) DatabaseManager manager) {
LOGGER.log(Level.FINEST, "Closing ColumnManager resource, database name: " + manager.name());
LOGGER.log(Level.FINEST, "Closing DatabaseManager resource, database name: " + manager.name());
manager.close();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ void shouldUseDefaultConfiguration() {
assertThat(manager).isInstanceOf(ColumnConfigurationMock2.ColumnManagerMock.class);
}

@Test
void shouldReturnErrorWhenThereIsNotDatabase() {
Assertions.assertThrows(MappingException.class, () -> supplier.get());
}

@Test
void shouldClose(){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
column=column
column.settings.key=value
column.settings.key2=value2
jnosql.column.database=database
column.database=database
column.provider=org.eclipse.jnosql.mapping.column.configuration.ColumnConfigurationMock

0 comments on commit 5f144e7

Please sign in to comment.