-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
- Loading branch information
1 parent
d94de80
commit 6074ec1
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
.../test/java/org/eclipse/jnosql/communication/semistructured/DatabaseConfigurationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* and Apache License v2.0 which accompanies this distribution. | ||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | ||
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php. | ||
* You may elect to redistribute this code under either of these licenses. | ||
* | ||
*/ | ||
|
||
package org.eclipse.jnosql.communication.semistructured; | ||
|
||
import org.eclipse.jnosql.communication.CommunicationException; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.Assertions.assertThatThrownBy; | ||
|
||
class DatabaseConfigurationTest { | ||
|
||
|
||
|
||
@Test | ||
void shouldGetErrorConfiguration(){ | ||
assertThatThrownBy(DatabaseConfiguration::getConfiguration) | ||
.isInstanceOf(CommunicationException.class); | ||
} | ||
|
||
@Test | ||
void shouldGetErrorConfigurationClass(){ | ||
assertThatThrownBy(() -> DatabaseConfiguration.getConfiguration(DatabaseMock.class)) | ||
.isInstanceOf(CommunicationException.class); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...tructured/src/test/java/org/eclipse/jnosql/communication/semistructured/DatabaseMock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* and Apache License v2.0 which accompanies this distribution. | ||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | ||
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php. | ||
* You may elect to redistribute this code under either of these licenses. | ||
* | ||
*/ | ||
|
||
package org.eclipse.jnosql.communication.semistructured; | ||
|
||
import org.eclipse.jnosql.communication.Settings; | ||
|
||
public class DatabaseMock implements DatabaseConfiguration { | ||
|
||
@Override | ||
public DatabaseManagerFactory apply(Settings settings) { | ||
return null; | ||
} | ||
} |