Skip to content

Commit

Permalink
fixing build
Browse files Browse the repository at this point in the history
  • Loading branch information
lassewesth committed Nov 13, 2012
1 parent 360dcad commit 71b3ec9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
Expand Up @@ -24,6 +24,7 @@
import static org.junit.Assert.assertTrue;

import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLEncoder;

import javax.ws.rs.core.MediaType;
Expand Down Expand Up @@ -141,9 +142,12 @@ private String doRestCall( String script, Status status,
public void testGremlinImportGraph() throws UnsupportedEncodingException
{
data.get().clear();

URL graphML = GremlinPluginFunctionalTest.class.getResource( "/graphml.xml" );

String script = "" +
"g.clear();" +
"g.loadGraphML('https://raw.github.com/neo4j/gremlin-plugin/master/src/data/graphml1.xml');" +
"g.loadGraphML('" + graphML + "');" +
"g.idx('node_auto_index')[[name:'you']];";
String response = doRestCall( script, OK );
assertTrue( response.contains( "you" ) );
Expand Down
Expand Up @@ -99,8 +99,6 @@ public static void setUpBeforeClass() throws Exception
0.2f );
}

private String exampleURI = "https://github.com/tinkerpop/gremlin/raw/master/data/graph-example-1.xml";

@After
public void tearDown() throws Exception
{
Expand Down
48 changes: 48 additions & 0 deletions gremlin-plugin/src/test/resources/graphml.xml
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2002-2012 "Neo Technology,"
Network Engine for Objects in Lund AB [http://neotechnology.com]
This file is part of Neo4j.
Neo4j is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key id="weight" for="edge" attr.name="weight" attr.type="float"/>
<key id="name" for="node" attr.name="name" attr.type="string"/>
<key id="age" for="node" attr.name="age" attr.type="int"/>
<key id="lang" for="node" attr.name="lang" attr.type="string"/>
<graph id="G" edgedefault="directed">
<node id="1">
<data key="name">I</data>
</node>
<node id="2">
<data key="name">you</data>
</node>
<node id="3">
<data key="name">him</data>
</node>
<edge id="1" source="1" target="2" label="know">
<data key="weight">0.5</data>
</edge>
<edge id="2" source="1" target="3" label="know">
<data key="weight">0.8</data>
</edge>
</graph>
</graphml>

0 comments on commit 71b3ec9

Please sign in to comment.