forked from alexandru-slobodcicov/liquibase-mongodb
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for DNS Seed List Connection Format or Atlas Cluster
- Loading branch information
1 parent
a0be7d3
commit 3074ae3
Showing
8 changed files
with
253 additions
and
48 deletions.
There are no files selected for viewing
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
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
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
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
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
46 changes: 46 additions & 0 deletions
46
src/test/java/liquibase/ext/mongodb/database/MongoClientDriverTest.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,46 @@ | ||
package liquibase.ext.mongodb.database; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestInstance; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
@TestInstance(TestInstance.Lifecycle.PER_METHOD) | ||
class MongoClientDriverTest { | ||
|
||
protected MongoClientDriver mongoClientDriver; | ||
|
||
@BeforeEach | ||
void setUp() { | ||
mongoClientDriver = new MongoClientDriver(); | ||
} | ||
|
||
@Test | ||
void acceptsURL() { | ||
assertThat(mongoClientDriver.acceptsURL(null)).isFalse(); | ||
assertThat(mongoClientDriver.acceptsURL("")).isFalse(); | ||
assertThat(mongoClientDriver.acceptsURL("jdbc:oracle:thin:@localhost:1521:xe")).isFalse(); | ||
assertThat(mongoClientDriver.acceptsURL("mongodbsuffix://localhost")).isFalse(); | ||
assertThat(mongoClientDriver.acceptsURL("mongodb://localhost")).isTrue(); | ||
assertThat(mongoClientDriver.acceptsURL(" mongodb://localhost")).isTrue(); | ||
assertThat(mongoClientDriver.acceptsURL("mongodb+srv://localhost")).isTrue(); | ||
assertThat(mongoClientDriver.acceptsURL(" mongodb+srv://localhost")).isTrue(); | ||
} | ||
|
||
@Test | ||
void getMajorVersion() { | ||
assertThat(mongoClientDriver.getMajorVersion()).isEqualTo(0); | ||
} | ||
|
||
@Test | ||
void getMinorVersion() { | ||
assertThat(mongoClientDriver.getMinorVersion()).isEqualTo(0); | ||
} | ||
|
||
@Test | ||
void jdbcCompliant() { | ||
assertThat(mongoClientDriver.jdbcCompliant()).isFalse(); | ||
} | ||
} |
Oops, something went wrong.