test/src/test/java/eu/internetofus/common/test/MongoContainerTest.java
/**
   * Test that that start a MongoDB.
   */
Test that that start a MongoDB.
Test that that start a MongoDB .
@Test
  public void shouldStartContainer() {
    final var container = new MongoContainer<>();
    assertThat(container.network).isNotNull();
    assertThat(container.mongoContainer).isNull();
    assertThat(container.startMongoContainer()).isSameAs(container);
    assertThat(container.mongoContainer).isNotNull();
    assertThat(container.getMongoDBConfig()).isNotNull();
    assertThat(container.getMongoDBHost()).isNotNull();
    assertThat(container.getMongoDBPort()).isNotNull();
    final var current = container.mongoContainer;
    assertThat(container.startMongoContainer()).isSameAs(container);
    assertThat(container.mongoContainer).isSameAs(current);
    current.stop();
  }
@ Test public void shouldStartContainer ( ) { final var container = new MongoContainer < > ( ) ; assertThat ( container . network ) . isNotNull ( ) ; assertThat ( container . mongoContainer ) . isNull ( ) ; assertThat ( container . startMongoContainer ( ) ) . isSameAs ( container ) ; assertThat ( container . mongoContainer ) . isNotNull ( ) ; assertThat ( container . getMongoDBConfig ( ) ) . isNotNull ( ) ; assertThat ( container . getMongoDBHost ( ) ) . isNotNull ( ) ; assertThat ( container . getMongoDBPort ( ) ) . isNotNull ( ) ; final var current = container . mongoContainer ; assertThat ( container . startMongoContainer ( ) ) . isSameAs ( container ) ; assertThat ( container . mongoContainer ) . isSameAs ( current ) ; current . stop ( ) ; }
Test that that start a MongoDB.
Test that that start a MongoDB .