This is the page Baeldung
"); + } + + @Test + public void whenBlockIsDefined_ThenCanOverrideWithPartial() throws IOException { + Handlebars handlebars = new Handlebars(templateLoader); + Template template = handlebars.compile("simplemessage"); + Person person = new Person(); + person.setName("Baeldung"); + + String templateString = template.apply(person); + + assertThat(templateString).isEqualTo("\n\n" + + "\n" + + "\n This is the intro\n\n" + + "\n Hi there!\n\n" + + "\n" + + ""); + } +} diff --git a/libraries-2/src/test/java/com/baeldung/mapdb/CollectionsUnitTest.java b/libraries-2/src/test/java/com/baeldung/mapdb/CollectionsUnitTest.java new file mode 100644 index 0000000000..6f5141b054 --- /dev/null +++ b/libraries-2/src/test/java/com/baeldung/mapdb/CollectionsUnitTest.java @@ -0,0 +1,33 @@ +package com.baeldung.mapdb; + +import org.junit.Test; +import org.mapdb.DB; +import org.mapdb.DBMaker; +import org.mapdb.Serializer; + +import java.util.NavigableSet; + +import static junit.framework.Assert.assertEquals; + +public class CollectionsUnitTest { + + @Test + public void givenSetCreatedInDB_whenMultipleElementsAdded_checkOnlyOneExists() { + + DB db = DBMaker.memoryDB().make(); + + NavigableSetThis is the page {{name}}
\ No newline at end of file diff --git a/libraries-2/src/test/resources/handlebars/person.html b/libraries-2/src/test/resources/handlebars/person.html new file mode 100644 index 0000000000..9df7850f60 --- /dev/null +++ b/libraries-2/src/test/resources/handlebars/person.html @@ -0,0 +1 @@ +{{#isBusy this}}{{/isBusy}} \ No newline at end of file diff --git a/libraries-2/src/test/resources/handlebars/simplemessage.html b/libraries-2/src/test/resources/handlebars/simplemessage.html new file mode 100644 index 0000000000..3b3a01980a --- /dev/null +++ b/libraries-2/src/test/resources/handlebars/simplemessage.html @@ -0,0 +1,4 @@ +{{#partial "message" }} + Hi there! +{{/partial}} +{{> messagebase}} \ No newline at end of file diff --git a/libraries-2/src/test/resources/handlebars/with.html b/libraries-2/src/test/resources/handlebars/with.html new file mode 100644 index 0000000000..90077b4835 --- /dev/null +++ b/libraries-2/src/test/resources/handlebars/with.html @@ -0,0 +1,3 @@ +{{#with address}} +spring-rest
module before running this live test
+ */
public class OkHttpFileUploadingLiveTest {
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
diff --git a/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpGetLiveTest.java b/libraries-http/src/test/java/com/baeldung/okhttp/OkHttpGetLiveTest.java
similarity index 93%
rename from spring-rest/src/test/java/com/baeldung/okhttp/OkHttpGetLiveTest.java
rename to libraries-http/src/test/java/com/baeldung/okhttp/OkHttpGetLiveTest.java
index 3edd2eab06..5efc4aa998 100644
--- a/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpGetLiveTest.java
+++ b/libraries-http/src/test/java/com/baeldung/okhttp/OkHttpGetLiveTest.java
@@ -17,6 +17,9 @@ import okhttp3.Response;
import org.junit.Before;
import org.junit.Test;
+/**
+ * Execute spring-rest
module before running this live test
+ */
public class OkHttpGetLiveTest {
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
diff --git a/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpHeaderLiveTest.java b/libraries-http/src/test/java/com/baeldung/okhttp/OkHttpHeaderLiveTest.java
similarity index 100%
rename from spring-rest/src/test/java/com/baeldung/okhttp/OkHttpHeaderLiveTest.java
rename to libraries-http/src/test/java/com/baeldung/okhttp/OkHttpHeaderLiveTest.java
diff --git a/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpMiscLiveTest.java b/libraries-http/src/test/java/com/baeldung/okhttp/OkHttpMiscLiveTest.java
similarity index 95%
rename from spring-rest/src/test/java/com/baeldung/okhttp/OkHttpMiscLiveTest.java
rename to libraries-http/src/test/java/com/baeldung/okhttp/OkHttpMiscLiveTest.java
index 207ad14e71..24617794d1 100644
--- a/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpMiscLiveTest.java
+++ b/libraries-http/src/test/java/com/baeldung/okhttp/OkHttpMiscLiveTest.java
@@ -20,6 +20,9 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+/**
+ * Execute spring-rest
module before running this live test
+ */
public class OkHttpMiscLiveTest {
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
diff --git a/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpPostingLiveTest.java b/libraries-http/src/test/java/com/baeldung/okhttp/OkHttpPostingLiveTest.java
similarity index 94%
rename from spring-rest/src/test/java/com/baeldung/okhttp/OkHttpPostingLiveTest.java
rename to libraries-http/src/test/java/com/baeldung/okhttp/OkHttpPostingLiveTest.java
index 66fee0b626..19e689c093 100644
--- a/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpPostingLiveTest.java
+++ b/libraries-http/src/test/java/com/baeldung/okhttp/OkHttpPostingLiveTest.java
@@ -20,6 +20,9 @@ import okhttp3.Response;
import org.junit.Before;
import org.junit.Test;
+/**
+ * Execute spring-rest
module before running this live test
+ */
public class OkHttpPostingLiveTest {
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
diff --git a/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpRedirectLiveTest.java b/libraries-http/src/test/java/com/baeldung/okhttp/OkHttpRedirectLiveTest.java
similarity index 100%
rename from spring-rest/src/test/java/com/baeldung/okhttp/OkHttpRedirectLiveTest.java
rename to libraries-http/src/test/java/com/baeldung/okhttp/OkHttpRedirectLiveTest.java
diff --git a/spring-rest/src/test/java/com/baeldung/okhttp/ProgressRequestWrapper.java b/libraries-http/src/test/java/com/baeldung/okhttp/ProgressRequestWrapper.java
similarity index 100%
rename from spring-rest/src/test/java/com/baeldung/okhttp/ProgressRequestWrapper.java
rename to libraries-http/src/test/java/com/baeldung/okhttp/ProgressRequestWrapper.java
diff --git a/libraries-server/pom.xml b/libraries-server/pom.xml
index a6ead8fb31..72794729a5 100644
--- a/libraries-server/pom.xml
+++ b/libraries-server/pom.xml
@@ -65,7 +65,7 @@
${error}
+Login Form
+Client Registration :
+Authorization Server :
+Token Request :
+Token Response:
++ * This test application is meant to maintain a set of {@link Person} models. It + * exposes a "/persons" endpoint which supports the following operations: + * + *