From 9196c04890572269043b8aea71040eda1f767228 Mon Sep 17 00:00:00 2001 From: rmpestano Date: Wed, 14 Sep 2016 14:17:10 -0300 Subject: [PATCH] cosmetics --- .../dbunit/rules/DataSetExecutorIt.java | 23 +++++++++++++++++++ pom.xml | 3 +++ 2 files changed, 26 insertions(+) diff --git a/core/src/test/java/com/github/dbunit/rules/DataSetExecutorIt.java b/core/src/test/java/com/github/dbunit/rules/DataSetExecutorIt.java index c0df891..bc73249 100644 --- a/core/src/test/java/com/github/dbunit/rules/DataSetExecutorIt.java +++ b/core/src/test/java/com/github/dbunit/rules/DataSetExecutorIt.java @@ -139,4 +139,27 @@ public void shouldLoadUsersFromXmlDataset() { assertThat(user.getFollowers()).contains(expectedFollower); } + + @Test + public void shouldNotCreateDataSetWithoutConnection(){ + DataSetExecutorImpl executor = DataSetExecutorImpl.instance(new ConnectionHolderImpl(null)); + try{ + executor.createDataSet(new DataSetConfig("test-dataset")); + }catch (DataBaseSeedingException e){ + assertThat(e.getMessage()).isEqualTo("Could not initialize dataset: test-dataset"); + } + + } + + @Test + public void shouldNotCreateExecutiorWithoutConnection(){ + try{ + DataSetExecutorImpl executor = DataSetExecutorImpl.instance(null); + }catch (RuntimeException e){ + assertThat(e.getMessage()).isEqualTo("Invalid connection"); + } + + } + + } diff --git a/pom.xml b/pom.xml index 3017332..e2db733 100644 --- a/pom.xml +++ b/pom.xml @@ -215,12 +215,15 @@ jacoco-maven-plugin ${jacoco.version} + **/*Repository.* **/Q* **/*Service.* **/*User.* **/*UserRepository.* + **/*UserController.* + **/*Application.* **/*UserRepositoryTest.* **/*Contact* **/*Company*