From 6da922c20a3c8b5008fae6c5cdf94c72346bd739 Mon Sep 17 00:00:00 2001 From: Eugene Kovko <37694937+eukovko@users.noreply.github.com> Date: Mon, 17 Oct 2022 00:10:50 +0200 Subject: [PATCH] BAEL-5760: Creating a separate mocks-2 module (#12882) --- testing-modules/mocks-2/README.md | 4 +++ testing-modules/mocks-2/pom.xml | 33 +++++++++++++++++++ .../com/baeldung/datafaker/Collection.java | 0 .../main/java/com/baeldung/datafaker/Csv.java | 0 .../com/baeldung/datafaker/Examplify.java | 0 .../java/com/baeldung/datafaker/Json.java | 0 .../baeldung/datafaker/MethodInvocation.java | 0 .../datafaker/MethodInvocationWithParams.java | 0 .../baeldung/datafaker/MixedCollection.java | 0 .../java/com/baeldung/datafaker/Option.java | 0 .../java/com/baeldung/datafaker/Regexify.java | 2 +- .../com/baeldung/datafaker/Templatify.java | 0 .../mocks-2/src/main/resources/logback.xml | 13 ++++++++ .../datafaker/CollectionUnitTest.java | 0 .../com/baeldung/datafaker/CsvUnitTest.java | 0 .../baeldung/datafaker/ExamplifyUnitTest.java | 0 .../com/baeldung/datafaker/JsonUnitTest.java | 0 .../datafaker/MethodInvocationUnitTest.java | 0 .../MethodInvocationWithParamsUnitTest.java | 0 .../datafaker/MixedCollectionUnitTest.java | 0 .../baeldung/datafaker/OptionUnitTest.java | 0 .../baeldung/datafaker/RegexifyUnitTest.java | 0 .../datafaker/TemplatifyUnitTest.java | 0 testing-modules/mocks/pom.xml | 13 -------- testing-modules/pom.xml | 1 + 25 files changed, 52 insertions(+), 14 deletions(-) create mode 100644 testing-modules/mocks-2/README.md create mode 100644 testing-modules/mocks-2/pom.xml rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/Collection.java (100%) rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/Csv.java (100%) rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/Examplify.java (100%) rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/Json.java (100%) rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/MethodInvocation.java (100%) rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/MethodInvocationWithParams.java (100%) rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/MixedCollection.java (100%) rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/Option.java (100%) rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/Regexify.java (93%) rename testing-modules/{mocks => mocks-2}/src/main/java/com/baeldung/datafaker/Templatify.java (100%) create mode 100644 testing-modules/mocks-2/src/main/resources/logback.xml rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/CollectionUnitTest.java (100%) rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/CsvUnitTest.java (100%) rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/ExamplifyUnitTest.java (100%) rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/JsonUnitTest.java (100%) rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/MethodInvocationUnitTest.java (100%) rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/MethodInvocationWithParamsUnitTest.java (100%) rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/MixedCollectionUnitTest.java (100%) rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/OptionUnitTest.java (100%) rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/RegexifyUnitTest.java (100%) rename testing-modules/{mocks => mocks-2}/src/test/java/com/baeldung/datafaker/TemplatifyUnitTest.java (100%) diff --git a/testing-modules/mocks-2/README.md b/testing-modules/mocks-2/README.md new file mode 100644 index 0000000000..ad24083ff8 --- /dev/null +++ b/testing-modules/mocks-2/README.md @@ -0,0 +1,4 @@ +## Relevant articles: + +- [Introduction to Datafaker]() + diff --git a/testing-modules/mocks-2/pom.xml b/testing-modules/mocks-2/pom.xml new file mode 100644 index 0000000000..e030321235 --- /dev/null +++ b/testing-modules/mocks-2/pom.xml @@ -0,0 +1,33 @@ + + + 4.0.0 + mocks-2 + mocks-2 + + + testing-modules + com.baeldung + 1.0.0-SNAPSHOT + + + + + net.datafaker + datafaker + ${datefaker.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + + + 1.6.0 + 2.13.4 + + + \ No newline at end of file diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/Collection.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Collection.java similarity index 100% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/Collection.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Collection.java diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/Csv.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Csv.java similarity index 100% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/Csv.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Csv.java diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/Examplify.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Examplify.java similarity index 100% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/Examplify.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Examplify.java diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/Json.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Json.java similarity index 100% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/Json.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Json.java diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/MethodInvocation.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/MethodInvocation.java similarity index 100% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/MethodInvocation.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/MethodInvocation.java diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/MethodInvocationWithParams.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/MethodInvocationWithParams.java similarity index 100% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/MethodInvocationWithParams.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/MethodInvocationWithParams.java diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/MixedCollection.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/MixedCollection.java similarity index 100% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/MixedCollection.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/MixedCollection.java diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/Option.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Option.java similarity index 100% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/Option.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Option.java diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/Regexify.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Regexify.java similarity index 93% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/Regexify.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Regexify.java index 9b718431a2..921b2e725e 100644 --- a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/Regexify.java +++ b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Regexify.java @@ -1,6 +1,6 @@ package com.baeldung.datafaker; -import com.github.javafaker.Faker; +import net.datafaker.Faker; public class Regexify { private static final Faker faker = new Faker(); diff --git a/testing-modules/mocks/src/main/java/com/baeldung/datafaker/Templatify.java b/testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Templatify.java similarity index 100% rename from testing-modules/mocks/src/main/java/com/baeldung/datafaker/Templatify.java rename to testing-modules/mocks-2/src/main/java/com/baeldung/datafaker/Templatify.java diff --git a/testing-modules/mocks-2/src/main/resources/logback.xml b/testing-modules/mocks-2/src/main/resources/logback.xml new file mode 100644 index 0000000000..7d900d8ea8 --- /dev/null +++ b/testing-modules/mocks-2/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + \ No newline at end of file diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/CollectionUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/CollectionUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/CollectionUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/CollectionUnitTest.java diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/CsvUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/CsvUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/CsvUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/CsvUnitTest.java diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/ExamplifyUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/ExamplifyUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/ExamplifyUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/ExamplifyUnitTest.java diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/JsonUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/JsonUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/JsonUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/JsonUnitTest.java diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/MethodInvocationUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/MethodInvocationUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/MethodInvocationUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/MethodInvocationUnitTest.java diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/MethodInvocationWithParamsUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/MethodInvocationWithParamsUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/MethodInvocationWithParamsUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/MethodInvocationWithParamsUnitTest.java diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/MixedCollectionUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/MixedCollectionUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/MixedCollectionUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/MixedCollectionUnitTest.java diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/OptionUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/OptionUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/OptionUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/OptionUnitTest.java diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/RegexifyUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/RegexifyUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/RegexifyUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/RegexifyUnitTest.java diff --git a/testing-modules/mocks/src/test/java/com/baeldung/datafaker/TemplatifyUnitTest.java b/testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/TemplatifyUnitTest.java similarity index 100% rename from testing-modules/mocks/src/test/java/com/baeldung/datafaker/TemplatifyUnitTest.java rename to testing-modules/mocks-2/src/test/java/com/baeldung/datafaker/TemplatifyUnitTest.java diff --git a/testing-modules/mocks/pom.xml b/testing-modules/mocks/pom.xml index 82f1eaa8cf..577e2f9301 100644 --- a/testing-modules/mocks/pom.xml +++ b/testing-modules/mocks/pom.xml @@ -41,17 +41,6 @@ jimfs ${jimf.version} - - net.datafaker - datafaker - ${datefaker.version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - - @@ -61,8 +50,6 @@ 3.5.1 1.41 1.1 - 1.6.0 - 2.13.4 \ No newline at end of file diff --git a/testing-modules/pom.xml b/testing-modules/pom.xml index 731d61204f..15d5637728 100644 --- a/testing-modules/pom.xml +++ b/testing-modules/pom.xml @@ -32,6 +32,7 @@ mockito mockito-simple mocks + mocks-2 mockserver parallel-tests-junit powermock