diff --git a/core-java/README.md b/core-java/README.md index 737a7a2211..559507e472 100644 --- a/core-java/README.md +++ b/core-java/README.md @@ -113,4 +113,21 @@ - [Difference Between Wait and Sleep in Java](http://www.baeldung.com/java-wait-and-sleep) - [LongAdder and LongAccumulator in Java](http://www.baeldung.com/java-longadder-and-longaccumulator) - [Using Java MappedByteBuffer](http://www.baeldung.com/java-mapped-byte-buffer) - +- [Dynamic Proxies in Java](http://www.baeldung.com/java-dynamic-proxies) +- [How to Copy an Array in Java](http://www.baeldung.com/java-array-copy) +- [Introduction to JDBC](http://www.baeldung.com/java-jdbc) +- [Guide to CopyOnWriteArrayList](http://www.baeldung.com/java-copy-on-write-arraylist) +- [Period and Duration in Java](http://www.baeldung.com/java-period-duration) +- [Converting a Stack Trace to a String in Java](http://www.baeldung.com/java-stacktrace-to-string) +- [Guide to the Java Phaser](http://www.baeldung.com/java-phaser) +- [Count Occurrences of a Char in a String](http://www.baeldung.com/java-count-chars) +- [Java Double Brace Initialization](http://www.baeldung.com/java-double-brace-initialization) +- [The StackOverflowError in Java](http://www.baeldung.com/java-stack-overflow-error) +- [Split a String in Java](http://www.baeldung.com/java-split-string) +- [Introduction to Java Serialization](http://www.baeldung.com/java-serialization) +- [How to Remove the Last Character of a String?](http://www.baeldung.com/java-remove-last-character-of-string) +- [Guide to Synchronized Keyword in Java](http://www.baeldung.com/java-synchronized) +- [ClassNotFoundException vs NoClassDefFoundError](http://www.baeldung.com/java-classnotfoundexception-and-noclassdeffounderror) +- [Guide to UUID in Java](http://www.baeldung.com/java-uuid) +- [How to Get the Last Element of a Stream in Java?](http://www.baeldung.com/java-stream-last-element) +- [Guide to Escaping Characters in Java RegExps](http://www.baeldung.com/java-regexp-escape-char) diff --git a/core-java/src/main/java/com/baeldung/maths/FloatingPointArithmetic.java b/core-java/src/main/java/com/baeldung/maths/FloatingPointArithmetic.java new file mode 100644 index 0000000000..4163adcf09 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/maths/FloatingPointArithmetic.java @@ -0,0 +1,51 @@ +package com.baeldung.maths; + +import java.math.BigDecimal; + +public class FloatingPointArithmetic { + public static void main(String[] args) { + + double a = 13.22; + double b = 4.88; + double c = 21.45; + + System.out.println("a = " + a); + System.out.println("b = " + b); + System.out.println("c = " + c); + + double sum_ab = a + b; + System.out.println("a + b = " + sum_ab); + + double abc = a + b + c; + System.out.println("a + b + c = " + abc); + + double ab_c = sum_ab + c; + System.out.println("ab + c = " + ab_c); + + double sum_ac = a + c; + System.out.println("a + c = " + sum_ac); + + double acb = a + c + b; + System.out.println("a + c + b = " + acb); + + double ac_b = sum_ac + b; + System.out.println("ac + b = " + ac_b); + + double ab = 18.1; + double ac = 34.67; + double sum_ab_c = ab + c; + double sum_ac_b = ac + b; + System.out.println("ab + c = " + sum_ab_c); + System.out.println("ac + b = " + sum_ac_b); + + BigDecimal d = new BigDecimal(String.valueOf(a)); + BigDecimal e = new BigDecimal(String.valueOf(b)); + BigDecimal f = new BigDecimal(String.valueOf(c)); + + BigDecimal def = d.add(e).add(f); + BigDecimal dfe = d.add(f).add(e); + + System.out.println("d + e + f = " + def); + System.out.println("d + f + e = " + dfe); + } +} diff --git a/core-java/src/test/java/com/baeldung/java/currentmethod/CurrentlyExecutedMethodFinderTest.java b/core-java/src/test/java/com/baeldung/java/currentmethod/CurrentlyExecutedMethodFinderTest.java new file mode 100644 index 0000000000..9a231a9a3d --- /dev/null +++ b/core-java/src/test/java/com/baeldung/java/currentmethod/CurrentlyExecutedMethodFinderTest.java @@ -0,0 +1,43 @@ +package com.baeldung.java.currentmethod; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +/** + * The class presents various ways of finding the name of currently executed method. + */ +public class CurrentlyExecutedMethodFinderTest { + + @Test + public void givenCurrentThread_whenGetStackTrace_thenFindMethod() { + final StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); + assertEquals("givenCurrentThread_whenGetStackTrace_thenFindMethod", stackTrace[1].getMethodName()); + } + + @Test + public void givenException_whenGetStackTrace_thenFindMethod() { + String methodName = new Exception().getStackTrace()[0].getMethodName(); + assertEquals("givenException_whenGetStackTrace_thenFindMethod", methodName); + } + + @Test + public void givenThrowable_whenGetStacktrace_thenFindMethod() { + StackTraceElement[] stackTrace = new Throwable().getStackTrace(); + assertEquals("givenThrowable_whenGetStacktrace_thenFindMethod", stackTrace[0].getMethodName()); + } + + @Test + public void givenObject_whenGetEnclosingMethod_thenFindMethod() { + String methodName = new Object() {}.getClass().getEnclosingMethod().getName(); + assertEquals("givenObject_whenGetEnclosingMethod_thenFindMethod", methodName); + } + + @Test + public void givenLocal_whenGetEnclosingMethod_thenFindMethod() { + class Local {}; + String methodName = Local.class.getEnclosingMethod().getName(); + assertEquals("givenLocal_whenGetEnclosingMethod_thenFindMethod", methodName); + } + +} diff --git a/core-java/src/test/java/com/baeldung/maths/FloatingPointArithmeticTest.java b/core-java/src/test/java/com/baeldung/maths/FloatingPointArithmeticTest.java new file mode 100644 index 0000000000..2066f13c6d --- /dev/null +++ b/core-java/src/test/java/com/baeldung/maths/FloatingPointArithmeticTest.java @@ -0,0 +1,45 @@ +package com.baeldung.maths; + +import java.math.BigDecimal; + +import org.junit.Assert; +import org.junit.Test; + +public class FloatingPointArithmeticTest { + + @Test + public void givenDecimalNumbers_whenAddedTogether_thenGetExpectedResult() { + double a = 13.22; + double b = 4.88; + double c = 21.45; + double result = 39.55; + + double abc = a + b + c; + double acb = a + c + b; + + Assert.assertEquals(result, abc, 0); + Assert.assertNotEquals(result, acb, 0); + + double ab = 18.1; + double ac = 34.67; + + double ab_c = ab + c; + double ac_b = ac + b; + + Assert.assertEquals(result, ab_c, 0); + Assert.assertNotEquals(result, ac_b, 0); + + BigDecimal d = new BigDecimal(String.valueOf(a)); + BigDecimal e = new BigDecimal(String.valueOf(b)); + BigDecimal f = new BigDecimal(String.valueOf(c)); + BigDecimal sum = new BigDecimal("39.55"); + + BigDecimal def = d.add(e).add(f); + BigDecimal dfe = d.add(f).add(e); + + Assert.assertEquals(0, def.compareTo(sum)); + Assert.assertEquals(0, dfe.compareTo(sum)); + + Assert.assertNotEquals(0, sum.compareTo(new BigDecimal(String.valueOf(acb)))); + } +} diff --git a/core-java/src/test/java/com/baeldung/string/StringToCharStreamUnitTest.java b/core-java/src/test/java/com/baeldung/string/StringToCharStreamUnitTest.java index eeb3051fc1..1b02e5d291 100644 --- a/core-java/src/test/java/com/baeldung/string/StringToCharStreamUnitTest.java +++ b/core-java/src/test/java/com/baeldung/string/StringToCharStreamUnitTest.java @@ -2,41 +2,58 @@ package com.baeldung.string; import org.junit.Test; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.Stream; import static org.hamcrest.CoreMatchers.instanceOf; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; public class StringToCharStreamUnitTest { + private String testString = "Tests"; @Test public void givenTestString_whenChars_thenReturnIntStream() { - assertThat(StringToCharStream.getIntStreamFromChars("test"), instanceOf(IntStream.class)); + assertThat(testString.chars(), instanceOf(IntStream.class)); } @Test public void givenTestString_whenCodePoints_thenReturnIntStream() { - assertThat(StringToCharStream.getIntStreamFromCodePoints("test"), instanceOf(IntStream.class)); + assertThat(testString.codePoints(), instanceOf(IntStream.class)); + } + + @Test + public void givenTestString_whenCodePoints_thenShowOccurences() throws Exception { + Map map = testString.codePoints() + .mapToObj(c -> (char) c) + .filter(Character::isLetter) + .collect(Collectors.toMap(c -> c, c -> 1, Integer::sum)); + + System.out.println(map); } @Test public void givenIntStream_whenMapToObj_thenReturnCharacterStream() { - Stream characterStream - = StringToCharStream.mapIntStreamToCharStream(StringToCharStream.getIntStreamFromChars("test")); - Stream characterStream1 - = StringToCharStream.mapIntStreamToCharStream(StringToCharStream.getIntStreamFromCodePoints("test")); + Stream characterStream = testString.chars() + .mapToObj(c -> (char) c); + Stream characterStream1 = testString.codePoints() + .mapToObj(c -> (char) c); assertNotNull("IntStream returned by chars() did not map to Stream", characterStream); assertNotNull("IntStream returned by codePoints() did not map to Stream", characterStream1); } @Test public void givenIntStream_whenMapToObj_thenReturnStringStream() { - Stream stringStream - = StringToCharStream.mapIntStreamToStringStream(StringToCharStream.getIntStreamFromCodePoints("test")); - assertNotNull(stringStream); + List strings = testString.codePoints() + .mapToObj(c -> String.valueOf((char) c)) + .collect(Collectors.toList()); + + assertEquals(strings.size(), 5); } } diff --git a/guava/README.md b/guava/README.md index f46c4dd3de..56d282560b 100644 --- a/guava/README.md +++ b/guava/README.md @@ -25,3 +25,6 @@ - [Guide to Guava RangeMap](http://www.baeldung.com/guava-rangemap) - [Guide to Guava Table](http://www.baeldung.com/guava-table) - [Guide to Guava’s Reflection Utilities](http://www.baeldung.com/guava-reflection) +- [Guide to Guava ClassToInstanceMap](http://www.baeldung.com/guava-class-to-instance-map) +- [Guide to Guava MinMaxPriorityQueue and EvictingQueue](http://www.baeldung.com/guava-minmax-priority-queue-and-evicting-queue) +- [Guide to Mathematical Utilities in Guava](http://www.baeldung.com/guava-math) diff --git a/jee7/README.md b/jee7/README.md index 71163d6640..a2493e561b 100644 --- a/jee7/README.md +++ b/jee7/README.md @@ -4,3 +4,4 @@ - [Converters, Listeners and Validators in Java EE 7](http://www.baeldung.com/java-ee7-converter-listener-validator) - [Introduction to JAX-WS](http://www.baeldung.com/jax-ws) - [A Guide to Java EE Web-Related Annotations](http://www.baeldung.com/javaee-web-annotations) +- [Introduction to Testing with Arquillian](http://www.baeldung.com/arquillian) diff --git a/junit5/README.md b/junit5/README.md index 2ca5b08766..c1ff0eab63 100644 --- a/junit5/README.md +++ b/junit5/README.md @@ -1,3 +1,6 @@ ### Relevant Articles: - [The Basics of JUnit 5 – A Preview](http://www.baeldung.com/junit-5-preview) - [A Guide to JUnit 5](http://www.baeldung.com/junit-5) +- [Guide to Dynamic Tests in Junit 5](http://www.baeldung.com/junit5-dynamic-tests) +- [A Guide to @RepeatedTest in Junit 5](http://www.baeldung.com/junit-5-repeated-test) +- [Guide to Dynamic Tests in Junit 5](http://www.baeldung.com/junit5-dynamic-tests) diff --git a/kotlin/README.md b/kotlin/README.md index 57d16e0415..1408bc1ebd 100644 --- a/kotlin/README.md +++ b/kotlin/README.md @@ -4,5 +4,5 @@ - [A guide to the “when{}” block in Kotlin](http://www.baeldung.com/kotlin-when) - [Comprehensive Guide to Null Safety in Kotlin](http://www.baeldung.com/kotlin-null-safety) - [Kotlin Java Interoperability](http://www.baeldung.com/kotlin-java-interoperability) -- [Difference Between “==” and “===” in Kotlin]() +- [Difference Between “==” and “===” in Kotlin](http://www.baeldung.com/kotlin-equality-operators) - [Generics in Kotlin](http://www.baeldung.com/kotlin-generics) diff --git a/libraries/README.md b/libraries/README.md index 6774792177..f69885a30f 100644 --- a/libraries/README.md +++ b/libraries/README.md @@ -12,6 +12,11 @@ - [Introduction to Apache Commons Math](http://www.baeldung.com/apache-commons-math) - [Intro to JaVer](http://www.baeldung.com/serenity-bdd) - [Introduction to Netty](http://www.baeldung.com/netty) +- [Guide to Java Data Objects](http://www.baeldung.com/jdo) +- [Software Transactional Memory in Java Using Multiverse](http://www.baeldung.com/java-multiverse-stm) +- [Introduction to HikariCP](http://www.baeldung.com/hikaricp) +- [Serenity BDD with Spring and JBehave](http://www.baeldung.com/serenity-spring-jbehave) + The libraries module contains examples related to small libraries that are relatively easy to use and does not require any separate module of its own. diff --git a/libraries/pom.xml b/libraries/pom.xml index bc40514b2f..da040c9731 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -180,6 +180,12 @@ serenity-core ${serenity.version} test + + + org.asciidoctor + asciidoctor-java-integration + + net.serenity-bdd @@ -323,6 +329,16 @@ netty-all ${netty.version} + + org.asciidoctor + asciidoctorj + 1.5.4 + + + org.asciidoctor + asciidoctorj-pdf + 1.5.0-alpha.11 + org.apache.opennlp diff --git a/libraries/src/main/java/com/baeldung/asciidoctor/AsciidoctorDemo.java b/libraries/src/main/java/com/baeldung/asciidoctor/AsciidoctorDemo.java new file mode 100644 index 0000000000..a986c35126 --- /dev/null +++ b/libraries/src/main/java/com/baeldung/asciidoctor/AsciidoctorDemo.java @@ -0,0 +1,33 @@ +package com.baeldung.asciidoctor; + +import static org.asciidoctor.Asciidoctor.Factory.create; +import static org.asciidoctor.OptionsBuilder.options; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; + +import org.asciidoctor.Asciidoctor; + +public class AsciidoctorDemo { + + private final Asciidoctor asciidoctor; + + public AsciidoctorDemo() { + asciidoctor = create(); + } + + public void generatePDFFromString(final String input) { + + final Map options = options().inPlace(true) + .backend("pdf") + .asMap(); + + final String outfile = asciidoctor.convertFile(new File("sample.adoc"), options); + } + + public String generateHTMLFromString(final String input) { + final String output = asciidoctor.convert("Hello _Baeldung_!", new HashMap()); + return output; + } +} diff --git a/libraries/src/test/java/com/baeldung/asciidoctor/AsciidoctorDemoTest.java b/libraries/src/test/java/com/baeldung/asciidoctor/AsciidoctorDemoTest.java new file mode 100644 index 0000000000..3e312eb059 --- /dev/null +++ b/libraries/src/test/java/com/baeldung/asciidoctor/AsciidoctorDemoTest.java @@ -0,0 +1,13 @@ +package com.baeldung.asciidoctor; + +import org.junit.Assert; +import org.junit.Test; + +public class AsciidoctorDemoTest { + + @Test + public void givenString_whenConverting_thenResultingHTMLCode() { + final AsciidoctorDemo asciidoctorDemo = new AsciidoctorDemo(); + Assert.assertEquals(asciidoctorDemo.generateHTMLFromString("Hello _Baeldung_!"), "
\n

Hello Baeldung!

\n
"); + } +} diff --git a/mustache/README.md b/mustache/README.md new file mode 100644 index 0000000000..b616b2df8a --- /dev/null +++ b/mustache/README.md @@ -0,0 +1,2 @@ +### Relevant Articles: +[Introduction to Mustache](http://www.baeldung.com/mustache) diff --git a/pom.xml b/pom.xml index bd43694c9e..947b4ec441 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,6 @@ - spring-vertx aws akka-streams algorithms @@ -208,6 +207,7 @@ spring-userservice spring-zuul spring-reactor + spring-vertx testing testng diff --git a/selenium-junit-testng/chromedriver.exe b/selenium-junit-testng/chromedriver.exe deleted file mode 100644 index f6ce07cb32..0000000000 Binary files a/selenium-junit-testng/chromedriver.exe and /dev/null differ diff --git a/selenium-junit-testng/chromedriver.linux b/selenium-junit-testng/chromedriver.linux deleted file mode 100755 index 1fb5667a0b..0000000000 Binary files a/selenium-junit-testng/chromedriver.linux and /dev/null differ diff --git a/selenium-junit-testng/chromedriver.mac b/selenium-junit-testng/chromedriver.mac deleted file mode 100755 index 9ccb03049b..0000000000 Binary files a/selenium-junit-testng/chromedriver.mac and /dev/null differ diff --git a/selenium-junit-testng/geckodriver.mac b/selenium-junit-testng/geckodriver.mac new file mode 100755 index 0000000000..84f66123a4 Binary files /dev/null and b/selenium-junit-testng/geckodriver.mac differ diff --git a/selenium-junit-testng/pom.xml b/selenium-junit-testng/pom.xml index d44a81639c..5b695ca900 100644 --- a/selenium-junit-testng/pom.xml +++ b/selenium-junit-testng/pom.xml @@ -66,6 +66,6 @@ 6.10 - 3.0.1 + 3.4.0 \ No newline at end of file diff --git a/selenium-junit-testng/src/main/java/com/baeldung/selenium/SeleniumExample.java b/selenium-junit-testng/src/main/java/com/baeldung/selenium/SeleniumExample.java index b97f66e9dd..c5ad5182ff 100644 --- a/selenium-junit-testng/src/main/java/com/baeldung/selenium/SeleniumExample.java +++ b/selenium-junit-testng/src/main/java/com/baeldung/selenium/SeleniumExample.java @@ -1,32 +1,31 @@ package main.java.com.baeldung.selenium; +import main.java.com.baeldung.selenium.config.SeleniumConfig; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; +import org.openqa.selenium.interactions.Actions; import java.util.List; import java.util.concurrent.TimeUnit; public class SeleniumExample { - private WebDriver webDriver; + private SeleniumConfig config; private String url = "http://www.baeldung.com/"; public SeleniumExample() { - System.setProperty("webdriver.firefox.marionette", "C:\\selenium\\geckodriver.exe"); - webDriver = new FirefoxDriver(); - webDriver.manage().window().maximize(); - webDriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); - webDriver.get(url); + config = new SeleniumConfig(); + config.getDriver().get(url); } public void closeWindow() { - webDriver.close(); + this.config.getDriver().close(); } public String getTitle() { - return webDriver.getTitle(); + return this.config.getDriver().getTitle(); } public void getAboutBaeldungPage() { @@ -36,7 +35,7 @@ public class SeleniumExample { } private void closeOverlay() { - List webElementList = webDriver.findElements(By.tagName("a")); + List webElementList = this.config.getDriver().findElements(By.tagName("a")); if (webElementList != null) { webElementList.stream() .filter(webElement -> "Close".equalsIgnoreCase(webElement.getAttribute("title"))) @@ -47,14 +46,18 @@ public class SeleniumExample { } private void clickAboutLink() { - webDriver.findElement(By.partialLinkText("About")).click(); + this.config.getDriver().findElement(By.partialLinkText("About")).click(); } private void clickAboutUsLink() { - webDriver.findElement(By.partialLinkText("About Baeldung.")).click(); + Actions builder = new Actions(config.getDriver()); + WebElement element = this.config.getDriver().findElement(By.partialLinkText("About Baeldung.")); + builder.moveToElement(element).build().perform(); } public boolean isAuthorInformationAvailable() { - return webDriver.findElement(By.xpath("//*[contains(text(), 'an engineer with a passion for teaching and building stuff on the web')]")).isDisplayed(); + return this.config.getDriver() + .findElement(By.cssSelector("article > .row > div")) + .isDisplayed(); } } diff --git a/selenium-junit-testng/src/main/java/com/baeldung/selenium/config/SeleniumConfig.java b/selenium-junit-testng/src/main/java/com/baeldung/selenium/config/SeleniumConfig.java index 7a6eb2fb73..c84283b76b 100644 --- a/selenium-junit-testng/src/main/java/com/baeldung/selenium/config/SeleniumConfig.java +++ b/selenium-junit-testng/src/main/java/com/baeldung/selenium/config/SeleniumConfig.java @@ -4,9 +4,11 @@ import org.openqa.selenium.Capabilities; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.remote.DesiredCapabilities; import java.io.File; +import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -15,30 +17,13 @@ public class SeleniumConfig { private WebDriver driver; public SeleniumConfig() { - Capabilities capabilities = DesiredCapabilities.chrome(); - driver = new ChromeDriver(capabilities); + Capabilities capabilities = DesiredCapabilities.firefox(); + driver = new FirefoxDriver(capabilities); + driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); } static { - String osName = getOsName("os.name").toLowerCase(); - final Matcher matcher = Pattern.compile("(mac|nux|win)").matcher(osName); - if (matcher.find()) { - switch (matcher.group()) { - case "mac": - System.setProperty("webdriver.chrome.driver", findFile("chromedriver.mac")); - break; - case "nux": - System.setProperty("webdriver.chrome.driver", findFile("chromedriver.linux")); - break; - case "win": - System.setProperty("webdriver.chrome.driver", findFile("chromedriver.exe")); - break; - } - } - } - - private static String getOsName(String prop) { - return (System.getProperty(prop)); + System.setProperty("webdriver.gecko.driver", findFile("geckodriver.mac")); } static private String findFile(String filename) { @@ -51,7 +36,7 @@ public class SeleniumConfig { } public void close() { - driver.quit(); + driver.close(); } public void navigateTo(String url) { diff --git a/selenium-junit-testng/src/test/java/com/baeldung/selenium/junit/SeleniumWithJUnitLiveTest.java b/selenium-junit-testng/src/test/java/com/baeldung/selenium/junit/SeleniumWithJUnitLiveTest.java index f05540542c..b1a4149358 100644 --- a/selenium-junit-testng/src/test/java/com/baeldung/selenium/junit/SeleniumWithJUnitLiveTest.java +++ b/selenium-junit-testng/src/test/java/com/baeldung/selenium/junit/SeleniumWithJUnitLiveTest.java @@ -10,7 +10,7 @@ import static org.testng.Assert.*; public class SeleniumWithJUnitLiveTest { private static SeleniumExample seleniumExample; - private String expectedTitle = "About Baeldung | Baeldung"; + private String expectedTitle = "Baeldung | Java, Spring and Web Development tutorials"; @BeforeClass public static void setUp() { diff --git a/selenium-junit-testng/src/test/java/com/baeldung/selenium/testng/SeleniumWithTestNGLiveTest.java b/selenium-junit-testng/src/test/java/com/baeldung/selenium/testng/SeleniumWithTestNGLiveTest.java index 2778e7eaa1..94426edc6d 100644 --- a/selenium-junit-testng/src/test/java/com/baeldung/selenium/testng/SeleniumWithTestNGLiveTest.java +++ b/selenium-junit-testng/src/test/java/com/baeldung/selenium/testng/SeleniumWithTestNGLiveTest.java @@ -10,7 +10,7 @@ import static org.testng.Assert.*; public class SeleniumWithTestNGLiveTest { private SeleniumExample seleniumExample; - private String expectedTitle = "About Baeldung | Baeldung"; + private String expectedTitle = "Baeldung | Java, Spring and Web Development tutorials"; @BeforeSuite public void setUp() { diff --git a/spring-boot/README.MD b/spring-boot/README.MD index 4199b43e9a..9a4a9f3686 100644 --- a/spring-boot/README.MD +++ b/spring-boot/README.MD @@ -23,3 +23,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Create a Custom Auto-Configuration with Spring Boot](http://www.baeldung.com/spring-boot-custom-auto-configuration) - [Testing in Spring Boot](http://www.baeldung.com/spring-boot-testing) - [Guide to @ConfigurationProperties in Spring Boot](http://www.baeldung.com/configuration-properties-in-spring-boot) +- [Spring Boot and Togglz Aspect](http://www.baeldung.com/spring-togglz) diff --git a/spring-cloud/spring-cloud-bootstrap/README.MD b/spring-cloud/spring-cloud-bootstrap/README.MD index d8eedc3249..a174fba3dd 100644 --- a/spring-cloud/spring-cloud-bootstrap/README.MD +++ b/spring-cloud/spring-cloud-bootstrap/README.MD @@ -2,6 +2,7 @@ - [Spring Cloud – Bootstrapping](http://www.baeldung.com/spring-cloud-bootstrapping) - [Spring Cloud – Securing Services](http://www.baeldung.com/spring-cloud-securing-services) - [Spring Cloud – Tracing Services with Zipkin](http://www.baeldung.com/tracing-services-with-zipkin) +- [Spring Cloud – Adding Angular 4](http://www.baeldung.com/spring-cloud-angular) - To run the project: diff --git a/spring-mvc-webflow/README.md b/spring-mvc-webflow/README.md index e627fdbffe..2df4716e31 100644 --- a/spring-mvc-webflow/README.md +++ b/spring-mvc-webflow/README.md @@ -6,3 +6,4 @@ ### Relevant Articles: - +- [Guide to Spring Web Flow](http://www.baeldung.com/spring-web-flow) diff --git a/spring-remoting/README.md b/spring-remoting/README.md index 96a68977a5..da8238b034 100644 --- a/spring-remoting/README.md +++ b/spring-remoting/README.md @@ -4,6 +4,7 @@ - [Intro to Spring Remoting with HTTP Invokers](http://www.baeldung.com/spring-remoting-http-invoker) - [Spring Remoting with Hessian and Burlap](http://www.baeldung.com/spring-remoting-hessian-burlap) - [Spring Remoting with AMQP](http://www.baeldung.com/spring-remoting-amqp) +- [Spring Remoting with JMS](http://www.baeldung.com/spring-remoting-jms) ### Overview This Maven project contains the Java source code for various modules used in the Spring Remoting series of articles. diff --git a/spring-roo/README.md b/spring-roo/README.md new file mode 100644 index 0000000000..b63b6f35d4 --- /dev/null +++ b/spring-roo/README.md @@ -0,0 +1,2 @@ +### Relevant Articles: +[Quick Guide to Spring Roo](http://www.baeldung.com/spring-roo) diff --git a/spring-vertx/pom.xml b/spring-vertx/pom.xml index 9fbfda5d62..2ab506f667 100644 --- a/spring-vertx/pom.xml +++ b/spring-vertx/pom.xml @@ -8,7 +8,7 @@ 0.0.1-SNAPSHOT jar - vertx-spring + spring-vertx A demo project with vertx spring integration @@ -41,6 +41,7 @@
+ io.vertx vertx-web diff --git a/spring-vertx/src/main/java/com/baeldung/vertxspring/VertxSpringApplication.java b/spring-vertx/src/main/java/com/baeldung/vertxspring/VertxSpringApplication.java index fdd382b56c..a22f9be355 100644 --- a/spring-vertx/src/main/java/com/baeldung/vertxspring/VertxSpringApplication.java +++ b/spring-vertx/src/main/java/com/baeldung/vertxspring/VertxSpringApplication.java @@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import com.baeldung.vertxspring.verticles.ServerVerticle; -import com.baeldung.vertxspring.verticles.ServiceVerticle; +import com.baeldung.vertxspring.verticles.ArticleRecipientVerticle; import io.vertx.core.Vertx; @@ -26,7 +26,7 @@ public class VertxSpringApplication { private ServerVerticle serverVerticle; @Autowired - private ServiceVerticle serviceVerticle; + private ArticleRecipientVerticle serviceVerticle; public static void main(String[] args) { SpringApplication.run(VertxSpringApplication.class, args); diff --git a/spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ServiceVerticle.java b/spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ArticleRecipientVerticle.java similarity index 95% rename from spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ServiceVerticle.java rename to spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ArticleRecipientVerticle.java index b6d3a8d981..52ea718320 100644 --- a/spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ServiceVerticle.java +++ b/spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ArticleRecipientVerticle.java @@ -13,7 +13,7 @@ import io.vertx.core.eventbus.Message; import io.vertx.core.json.Json; @Component -public class ServiceVerticle extends AbstractVerticle { +public class ArticleRecipientVerticle extends AbstractVerticle { public static final String GET_ALL_ARTICLES = "get.articles.all"; diff --git a/spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ServerVerticle.java b/spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ServerVerticle.java index aa2196b53d..3c23cb15bc 100644 --- a/spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ServerVerticle.java +++ b/spring-vertx/src/main/java/com/baeldung/vertxspring/verticles/ServerVerticle.java @@ -11,7 +11,7 @@ public class ServerVerticle extends AbstractVerticle { private void getAllArticlesHandler(RoutingContext routingContext) { vertx.eventBus() - .send(ServiceVerticle.GET_ALL_ARTICLES, "", result -> { + .send(ArticleRecipientVerticle.GET_ALL_ARTICLES, "", result -> { if (result.succeeded()) { routingContext.response() .putHeader("content-type", "application/json") diff --git a/testing/README.md b/testing/README.md index f9cde93295..6338a52f3d 100644 --- a/testing/README.md +++ b/testing/README.md @@ -11,3 +11,4 @@ - [Cucumber and Scenario Outline](http://www.baeldung.com/cucumber-scenario-outline) - [Testing with Google Truth](http://www.baeldung.com/google-truth) - [Testing with JGoTesting](http://www.baeldung.com/jgotesting) +- [Introduction to JUnitParams](http://www.baeldung.com/junit-params) diff --git a/testng/README.md b/testng/README.md index 0e3586c9f3..e54ee1dbf2 100644 --- a/testng/README.md +++ b/testng/README.md @@ -1,3 +1,4 @@ ### Relevant articles - [Introduction to TestNG](http://www.baeldung.com/testng) +- [Custom Reporting with TestNG](http://www.baeldung.com/testng-custom-reporting)