Merge pull request #167 from atoulme/windows_tests

Windows tests
diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml
new file mode 100644
index 0000000..89581c2
--- /dev/null
+++ b/.github/workflows/test-windows.yml
@@ -0,0 +1,53 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: test-windows
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  test-windows:
+    runs-on: windows-latest
+    steps:
+      - uses: actions/checkout@v1
+        with:
+          submodules: true
+      - name: Cache Gradle packages
+        uses: actions/cache@v1
+        with:
+          path: ~/.gradle/caches
+          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
+          restore-keys: ${{ runner.os }}-gradle
+      - name: Cache Maven Repository
+        uses: actions/cache@v1
+        with:
+          path: ~/.m2
+          key: ${{ runner.os }}-m2-${{ hashFiles('**/dependency-versions.gradle') }}
+          restore-keys: ${{ runner.os }}-m2
+      - name: Set up JDK 11
+        uses: actions/setup-java@v1
+        with:
+          java-version: 11
+      - name: gradle test
+        uses: eskatos/gradle-command-action@v1
+        with:
+          gradle-version: 6.3
+          arguments: test
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 77dde57..61493ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,3 +40,4 @@
 data
 ssb-keys
 docs_warning
+io/org
\ No newline at end of file
diff --git a/eth-client/src/test/kotlin/org/apache/tuweni/ethclient/EthereumClientConfigTest.kt b/eth-client/src/test/kotlin/org/apache/tuweni/ethclient/EthereumClientConfigTest.kt
index 8c496c7..e77eb35 100644
--- a/eth-client/src/test/kotlin/org/apache/tuweni/ethclient/EthereumClientConfigTest.kt
+++ b/eth-client/src/test/kotlin/org/apache/tuweni/ethclient/EthereumClientConfigTest.kt
@@ -20,15 +20,14 @@
 import org.junit.jupiter.api.Assertions.assertNotNull
 import org.junit.jupiter.api.Test
 import org.junit.jupiter.api.assertThrows
-import java.lang.IllegalArgumentException
 import java.nio.file.Paths
 
 class EthereumClientConfigTest {
 
   @Test
   fun testFileConfig() {
-    val config =
-      EthereumClientConfig.fromFile(Paths.get(EthereumClientConfigTest::class.java.getResource("/minimal.conf").path))
+    val config = EthereumClientConfig.fromFile(
+      Paths.get(EthereumClientConfigTest::class.java.getResource("/minimal.conf").toURI()))
     assertNotNull(config)
   }
 
@@ -83,7 +82,10 @@
   @Test
   fun toToml() {
     val config = EthereumClientConfig.fromString("[storage.forui]\npath=\"data\"")
-    assertEquals("[storage.forui]\npath = \"data\"\n", config.toToml())
+    assertEquals(
+      "[storage.forui]${System.lineSeparator()}path = \"data\"${System.lineSeparator()}",
+      config.toToml()
+    )
   }
 
   @Test
diff --git a/toml/src/test/java/org/apache/tuweni/toml/MutableTomlArrayTest.java b/toml/src/test/java/org/apache/tuweni/toml/MutableTomlArrayTest.java
index b3a8845..1ae87d5 100644
--- a/toml/src/test/java/org/apache/tuweni/toml/MutableTomlArrayTest.java
+++ b/toml/src/test/java/org/apache/tuweni/toml/MutableTomlArrayTest.java
@@ -143,6 +143,15 @@
   @Test
   void toJson() {
     MutableTomlArray array = new MutableTomlArray().append("foo", positionAt(1, 1)).append("bar", positionAt(10, 1));
-    assertEquals("[\n  \"foo\",\n  \"bar\"\n]\n", array.toJson());
+    assertEquals(
+        "["
+            + System.lineSeparator()
+            + "  \"foo\","
+            + System.lineSeparator()
+            + "  \"bar\""
+            + System.lineSeparator()
+            + "]"
+            + System.lineSeparator(),
+        array.toJson());
   }
 }