Skip to content

Commit 52f36f5

Browse files
committed
Merge branch '3.6-dev' into 3.7-dev
2 parents 31aca5d + 2d6814a commit 52f36f5

5 files changed

Lines changed: 48 additions & 45 deletions

File tree

gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/ParametersTest.java

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.Collections;
2929
import java.util.List;
3030
import java.util.Map;
31+
import java.util.HashMap;
3132

3233
import static org.hamcrest.CoreMatchers.is;
3334
import static org.hamcrest.MatcherAssert.assertThat;
@@ -57,7 +58,15 @@ public void shouldAllowNullValues() {
5758

5859
final Object[] params = parameters.getKeyValues(mock(Traverser.Admin.class));
5960
assertEquals(6, params.length);
60-
assertThat(Arrays.equals(new Object[] {"a", null, "b", "bat", "c", "cat"}, params), is(true));
61+
Map<Object, Object> paramsMap = new HashMap<>();
62+
for (int i = 0; i < params.length; i += 2) {
63+
paramsMap.put(params[i], params[i + 1]);
64+
}
65+
Map<Object, Object> expectedMap = new HashMap<>();
66+
expectedMap.put("a", null);
67+
expectedMap.put("b", "bat");
68+
expectedMap.put("c", "cat");
69+
assertThat(paramsMap.equals(expectedMap), is(true));
6170
}
6271

6372
@Test
@@ -67,7 +76,15 @@ public void shouldGetKeyValues() {
6776

6877
final Object[] params = parameters.getKeyValues(mock(Traverser.Admin.class));
6978
assertEquals(6, params.length);
70-
assertThat(Arrays.equals(new Object[] {"a", "axe", "b", "bat", "c", "cat"}, params), is(true));
79+
Map<Object, Object> paramsMap = new HashMap<>();
80+
for (int i = 0; i < params.length; i += 2) {
81+
paramsMap.put(params[i], params[i + 1]);
82+
}
83+
Map<Object, Object> expectedMap = new HashMap<>();
84+
expectedMap.put("a", "axe");
85+
expectedMap.put("b", "bat");
86+
expectedMap.put("c", "cat");
87+
assertThat(paramsMap.equals(expectedMap), is(true));
7188
}
7289

7390
@Test
@@ -77,7 +94,14 @@ public void shouldGetKeyValuesIgnoringSomeKeys() {
7794

7895
final Object[] params = parameters.getKeyValues(mock(Traverser.Admin.class), "b");
7996
assertEquals(4, params.length);
80-
assertThat(Arrays.equals(new Object[] {"a", "axe", "c", "cat"}, params), is(true));
97+
Map<Object, Object> paramsMap = new HashMap<>();
98+
for (int i = 0; i < params.length; i += 2) {
99+
paramsMap.put(params[i], params[i + 1]);
100+
}
101+
Map<Object, Object> expectedMap = new HashMap<>();
102+
expectedMap.put("a", "axe");
103+
expectedMap.put("c", "cat");
104+
assertThat(paramsMap.equals(expectedMap), is(true));
81105
}
82106

83107
@Test
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"docfx": {
6+
"version": "2.77.0",
7+
"commands": [
8+
"docfx"
9+
]
10+
}
11+
}
12+
}

gremlin-dotnet/src/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
/docfx
2-
docfx.zip
31
/_site

gremlin-dotnet/src/docfx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"src": [
55
{
6-
"files": [ "**/*.cs" ],
6+
"files": [ "**/*.csproj" ],
77
"exclude": [ "**/bin/**", "**/obj/**" ],
88
"src": "Gremlin.Net"
99
}

gremlin-dotnet/src/pom.xml

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ limitations under the License.
2727
<name>Apache TinkerPop :: Gremlin.Net - Source</name>
2828
<packaging>${packaging.type}</packaging>
2929
<properties>
30-
<nugetVersion>4.9.2</nugetVersion>
30+
<nugetVersion>6.11.1</nugetVersion>
3131
<nugetExe>nuget-${nugetVersion}.exe</nugetExe>
3232
</properties>
3333

@@ -155,44 +155,13 @@ limitations under the License.
155155
<configuration>
156156
<target>
157157
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
158-
<if>
159-
<!-- docfx sadly requires mono and nuget at this time:
160-
1. https://github.com/dotnet/docfx/issues/3389 (nuget required for a dll not in mono
161-
2. https://github.com/dotnet/docfx/issues/718#issuecomment-256700598 (mono workaround) -->
162-
<and>
163-
<available file="mono" filepath="${env.PATH}"/>
164-
<available file="${nugetExe}"/>
165-
</and>
166-
<then>
167-
<if>
168-
<available file="docfx/docfx.exe"/>
169-
<then>
170-
<echo>docfx already downloaded.</echo>
171-
</then>
172-
173-
<else>
174-
<exec executable="wget" failonerror="true">
175-
<arg line="https://github.com/dotnet/docfx/releases/download/v2.58/docfx.zip"/>
176-
</exec>
177-
<mkdir dir="docfx"/>
178-
<exec executable="unzip" failonerror="true">
179-
<arg line="docfx.zip -d docfx"/>
180-
</exec>
181-
<delete file="docfx.zip"/>
182-
<exec executable="mono" failonerror="true">
183-
<arg line="${nugetExe} install -OutputDirectory docfx SQLitePCLRaw.core -ExcludeVersion"/>
184-
</exec>
185-
</else>
186-
</if>
187-
<exec executable="mono" failonerror="true">
188-
<arg line="docfx/docfx.exe"/>
189-
</exec>
190-
</then>
191-
<else>
192-
<echo>Skipping docfx generation as mono and nuget are required.</echo>
193-
<echo>nuget must be installed as it would if doing a .NET deployment - see the glv-dotnet-deploy Maven profile for more information.</echo>
194-
</else>
195-
</if>
158+
<!-- update docfx if necessary -->
159+
<exec executable="dotnet" failonerror="true">
160+
<arg line="dotnet tool restore"/>
161+
</exec>
162+
<exec executable="dotnet" failonerror="true">
163+
<arg line="docfx docfx.json"/>
164+
</exec>
196165
</target>
197166
</configuration>
198167
</execution>

0 commit comments

Comments
 (0)