Skip to content

Commit 8628a63

Browse files
author
eugenp
committed
test fixes
1 parent d0d62b5 commit 8628a63

3 files changed

Lines changed: 19 additions & 8 deletions

File tree

core-java/src/main/java/com/baeldung/hextToAscii/HexToAscii.java renamed to core-java/src/main/java/com/baeldung/hexToAscii/HexToAscii.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
package com.baeldung.hexToAscii;
22

3+
import static org.junit.Assert.assertEquals;
4+
5+
import org.junit.Test;
6+
37
public class HexToAscii {
48

59
@Test
610
public static void whenHexToAscii() {
7-
811
String asciiString = "http://www.baeldung.com/jackson-serialize-dates";
912
String hexEquivalent = "687474703a2f2f7777772e6261656c64756e672e636f6d2f6a61636b736f6e2d73657269616c697a652d6461746573";
1013

@@ -13,15 +16,15 @@ public static void whenHexToAscii() {
1316

1417
@Test
1518
public static void whenAsciiToHex() {
16-
1719
String asciiString = "http://www.baeldung.com/jackson-serialize-dates";
1820
String hexEquivalent = "687474703a2f2f7777772e6261656c64756e672e636f6d2f6a61636b736f6e2d73657269616c697a652d6461746573";
1921

2022
assertEquals(hexEquivalent, asciiToHex(asciiString));
2123
}
2224

23-
private static String asciiToHex(String asciiStr) {
25+
//
2426

27+
private static String asciiToHex(String asciiStr) {
2528
char[] chars = asciiStr.toCharArray();
2629
StringBuilder hex = new StringBuilder();
2730
for (char ch : chars) {
@@ -31,13 +34,13 @@ private static String asciiToHex(String asciiStr) {
3134
return hex.toString();
3235
}
3336

34-
private static String hexToASCII(String hexStr) {
35-
37+
private static String hexToAscii(String hexStr) {
3638
StringBuilder output = new StringBuilder("");
3739
for (int i = 0; i < hexStr.length(); i += 2) {
3840
String str = hexStr.substring(i, i + 2);
3941
output.append((char) Integer.parseInt(str, 16));
4042
}
4143
return output.toString();
4244
}
45+
4346
}

‎spring-jpa/README.md‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,12 @@
1313
- [Hibernate Second-Level Cache](http://www.baeldung.com/hibernate-second-level-cache)
1414
- [Spring, Hibernate and a JNDI Datasource](http://www.baeldung.com/spring-persistence-jpa-jndi-datasource)
1515

16-
To ignore "No persistence xml file found in project", you do:
17-
Project -> Properties -> Java Persistance -> JPA -> Error/Warnings -> Select Ignore on "No persistence xml file found in project"
16+
### Eclipse Config
17+
After importing the project into Eclipse, you may see the following error:
18+
"No persistence xml file found in project"
19+
20+
This can be ignored:
21+
- Project -> Properties -> Java Persistance -> JPA -> Error/Warnings -> Select Ignore on "No persistence xml file found in project"
22+
Or:
23+
- Eclipse -> Preferences - Validation - disable the "Build" execution of the JPA Validator
24+

‎spring-thymeleaf/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
## Spring Thymeleaf Example Project
44

5-
65
### Relevant Articles:
76
- [Introduction to Using Thymeleaf in Spring](http://www.baeldung.com/thymeleaf-in-spring-mvc)
87
- [CSRF Protection with Spring MVC and Thymeleaf](http://www.baeldung.com/csrf-thymeleaf-with-spring-security)
98

9+
1010
### Build the Project
1111

1212
mvn clean install
1313

14+
1415
### Run the Project
1516
mvn cargo:run
1617
- **note**: starts on port '8082'

0 commit comments

Comments
 (0)