dummy/src/test/java/eu/internetofus/wenet_dummy/persistence/DummiesRepositoryIT.java
/**
   * Verify that can store a dummy with an id of an stored dummy.
   *
   * @param vertx       event bus to use.
   * @param testContext context that executes the test.
   *
   * @see DummiesRepository#storeDummy(Dummy)
   */
Verify that can store a dummy with an id of an stored dummy.
@param vertx       event bus to use.
@param testContext context that executes the test.


Verify that can store a dummy with an id of an stored dummy . @param vertx event bus to use . @param testContext context that executes the test .
@Test
  public void shouldNotStoreTwoDummyWithTheSameId(final Vertx vertx, final VertxTestContext testContext) {
    final var id = UUID.randomUUID().toString();
    final var dummy = new Dummy();
    dummy.id = id;
    final var repository = DummiesRepository.createProxy(vertx);
    testContext.assertComplete(repository.storeDummy(dummy)).onSuccess(stored -> testContext.verify(() -> {
      assertThat(stored).isNotNull();
      testContext.assertFailure(repository.storeDummy(stored)).onFailure(error -> testContext.completeNow());
    }));
  }
@ Test public void shouldNotStoreTwoDummyWithTheSameId ( final Vertx vertx , final VertxTestContext testContext ) { final var id = UUID . randomUUID ( ) . toString ( ) ; final var dummy = new Dummy ( ) ; dummy . id = id ; final var repository = DummiesRepository . createProxy ( vertx ) ; testContext . assertComplete ( repository . storeDummy ( dummy ) ) . onSuccess ( stored -> testContext . verify ( ( ) -> { assertThat ( stored ) . isNotNull ( ) ; testContext . assertFailure ( repository . storeDummy ( stored ) ) . onFailure ( error -> testContext . completeNow ( ) ) ; } ) ) ; }
Verify that can store a dummy with an id of an stored dummy.
Verify that can store a dummy with an id of an stored dummy .