-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from Readify/issue-14---T
Add Transaction, Unwind, Authentication support & CollectAs update
- Loading branch information
Showing
184 changed files
with
21,847 additions
and
16,468 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,6 @@ Neo4jClient.*.nupkg | |
*.docstates | ||
*.crunchsolution.cache | ||
packages | ||
*.ncrunch* | ||
*.ncrunchsolution | ||
*.Cache | ||
*.vs\ |
702 changes: 351 additions & 351 deletions
702
...ApiModels/GremlinTableCapResponseTests.cs → ...ApiModels/GremlinTableCapResponseTests.cs
Large diffs are not rendered by default.
Oops, something went wrong.
54 changes: 27 additions & 27 deletions
54
Test/ApiModels/RootApiResponseTests.cs → ...t.Tests/ApiModels/RootApiResponseTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
using NUnit.Framework; | ||
using Neo4jClient.ApiModels; | ||
|
||
namespace Neo4jClient.Test.ApiModels | ||
{ | ||
[TestFixture] | ||
public class RootApiResponseTests | ||
{ | ||
[Test] | ||
[TestCase("", Result = "0.0")] | ||
[TestCase("kgrkjkj", Result = "0.0")] | ||
[TestCase("1.5-82-g7cb21bb1-dirty", Result = "1.5", Description = "http://docs.neo4j.org/chunked/snapshot/rest-api-service-root.html")] | ||
[TestCase("1.5M02", Result = "1.5.0.2")] | ||
[TestCase("1.8.RC1", Result = "1.8.0.1")] | ||
[TestCase("1.5.M02", Result = "1.5.0.2", Description = "Retrieved via REST call from running 1.5M02 install")] | ||
[TestCase("1.7", Result = "1.7", Description = "http://docs.neo4j.org/chunked/1.7/rest-api-service-root.html")] | ||
[TestCase("1.7.2", Result = "1.7.2", Description = "http://docs.neo4j.org/chunked/1.7.2/rest-api-service-root.html")] | ||
[TestCase("1.8.M07-1-g09701c5", Result = "1.8.0.7", Description = "http://docs.neo4j.org/chunked/1.8.M07/rest-api-service-root.html")] | ||
[TestCase("1.9.RC1", Result = "1.9.0.1")] | ||
[TestCase("1.9.RC2", Result = "1.9.0.2")] | ||
public string Version(string versionString) | ||
{ | ||
var response = new RootApiResponse { neo4j_version = versionString }; | ||
return response.Version.ToString(); | ||
} | ||
} | ||
} | ||
using NUnit.Framework; | ||
using Neo4jClient.ApiModels; | ||
|
||
namespace Neo4jClient.Test.ApiModels | ||
{ | ||
[TestFixture] | ||
public class RootApiResponseTests | ||
{ | ||
[Test] | ||
[TestCase("", Result = "0.0")] | ||
[TestCase("kgrkjkj", Result = "0.0")] | ||
[TestCase("1.5-82-g7cb21bb1-dirty", Result = "1.5", Description = "http://docs.neo4j.org/chunked/snapshot/rest-api-service-root.html")] | ||
[TestCase("1.5M02", Result = "1.5.0.2")] | ||
[TestCase("1.8.RC1", Result = "1.8.0.1")] | ||
[TestCase("1.5.M02", Result = "1.5.0.2", Description = "Retrieved via REST call from running 1.5M02 install")] | ||
[TestCase("1.7", Result = "1.7", Description = "http://docs.neo4j.org/chunked/1.7/rest-api-service-root.html")] | ||
[TestCase("1.7.2", Result = "1.7.2", Description = "http://docs.neo4j.org/chunked/1.7.2/rest-api-service-root.html")] | ||
[TestCase("1.8.M07-1-g09701c5", Result = "1.8.0.7", Description = "http://docs.neo4j.org/chunked/1.8.M07/rest-api-service-root.html")] | ||
[TestCase("1.9.RC1", Result = "1.9.0.1")] | ||
[TestCase("1.9.RC2", Result = "1.9.0.2")] | ||
public string Version(string versionString) | ||
{ | ||
var response = new RootApiResponse { neo4j_version = versionString }; | ||
return response.Version.ToString(); | ||
} | ||
} | ||
} |
122 changes: 61 additions & 61 deletions
122
Test/ApiUsageIdeas.cs → Neo4jClient.Tests/ApiUsageIdeas.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
using System; | ||
using Neo4jClient.Test.Domain; | ||
using Neo4jClient.Test.Relationships; | ||
|
||
namespace Neo4jClient.Test | ||
{ | ||
// This class just documents how the API could be consumed. It was an | ||
// initial scratching ground before any of the original signatures, | ||
// interfaces, or functionality was put in place. Right now it has no | ||
// other requirements than just compiling (so as to assert backwards | ||
// compatibility with consumers). It is mainly kept for historical | ||
// purposes. | ||
class ApiUsageIdeas | ||
{ | ||
void Foo() | ||
{ | ||
IGraphClient graph = new GraphClient(new Uri("")); | ||
|
||
// Based on http://wiki.neo4j.org/content/Image:Warehouse.png | ||
|
||
// Can create nodes from POCOs | ||
var frameStore = graph.Create( | ||
new StorageLocation { Name = "Frame Store" }); | ||
var mainStore = graph.Create( | ||
new StorageLocation { Name = "Main Store" }); | ||
|
||
// Can create a node with outgoing relationships | ||
var frame = graph.Create( | ||
new Part { Name = "Frame" }, | ||
new StoredIn(frameStore)); | ||
|
||
// Can create multiple outgoing relationships and relationships with payloads | ||
graph.Create( | ||
new Product { Name = "Trike", Weight = 2 }, | ||
new StoredIn(mainStore), | ||
new Requires(frame, new Requires.Payload { Count = 1 })); | ||
|
||
// Can create relationships in both directions | ||
graph.Create( | ||
new Part { Name = "Pedal" }, | ||
new StoredIn(frameStore), | ||
new Requires(frame, new Requires.Payload { Count = 2 }) | ||
{ Direction = RelationshipDirection.Incoming }); | ||
|
||
var wheel = graph.Create( | ||
new Part { Name = "Wheel" }, | ||
new Requires(frame, new Requires.Payload { Count = 2 }) | ||
{ Direction = RelationshipDirection.Incoming }); | ||
|
||
// Can create implicit incoming relationships | ||
graph.Create( | ||
new StorageLocation { Name = "Wheel Store" }, | ||
new StoredIn(wheel)); | ||
|
||
// Can create relationships against the root node | ||
graph.Create( | ||
new StorageLocation {Name = "Auxillary Store"}, | ||
new StoredIn(wheel), | ||
new OwnedBy(graph.RootNode)); | ||
} | ||
} | ||
using System; | ||
using Neo4jClient.Test.Domain; | ||
using Neo4jClient.Test.Relationships; | ||
|
||
namespace Neo4jClient.Test | ||
{ | ||
// This class just documents how the API could be consumed. It was an | ||
// initial scratching ground before any of the original signatures, | ||
// interfaces, or functionality was put in place. Right now it has no | ||
// other requirements than just compiling (so as to assert backwards | ||
// compatibility with consumers). It is mainly kept for historical | ||
// purposes. | ||
class ApiUsageIdeas | ||
{ | ||
void Foo() | ||
{ | ||
IGraphClient graph = new GraphClient(new Uri("")); | ||
|
||
// Based on http://wiki.neo4j.org/content/Image:Warehouse.png | ||
|
||
// Can create nodes from POCOs | ||
var frameStore = graph.Create( | ||
new StorageLocation { Name = "Frame Store" }); | ||
var mainStore = graph.Create( | ||
new StorageLocation { Name = "Main Store" }); | ||
|
||
// Can create a node with outgoing relationships | ||
var frame = graph.Create( | ||
new Part { Name = "Frame" }, | ||
new StoredIn(frameStore)); | ||
|
||
// Can create multiple outgoing relationships and relationships with payloads | ||
graph.Create( | ||
new Product { Name = "Trike", Weight = 2 }, | ||
new StoredIn(mainStore), | ||
new Requires(frame, new Requires.Payload { Count = 1 })); | ||
|
||
// Can create relationships in both directions | ||
graph.Create( | ||
new Part { Name = "Pedal" }, | ||
new StoredIn(frameStore), | ||
new Requires(frame, new Requires.Payload { Count = 2 }) | ||
{ Direction = RelationshipDirection.Incoming }); | ||
|
||
var wheel = graph.Create( | ||
new Part { Name = "Wheel" }, | ||
new Requires(frame, new Requires.Payload { Count = 2 }) | ||
{ Direction = RelationshipDirection.Incoming }); | ||
|
||
// Can create implicit incoming relationships | ||
graph.Create( | ||
new StorageLocation { Name = "Wheel Store" }, | ||
new StoredIn(wheel)); | ||
|
||
// Can create relationships against the root node | ||
graph.Create( | ||
new StorageLocation {Name = "Auxillary Store"}, | ||
new StoredIn(wheel), | ||
new OwnedBy(graph.RootNode)); | ||
} | ||
} | ||
} |
42 changes: 21 additions & 21 deletions
42
Test/CultureInfoSetupFixture.cs → Neo4jClient.Tests/CultureInfoSetupFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
using System.Globalization; | ||
using System.Threading; | ||
using NUnit.Framework; | ||
|
||
namespace Neo4jClient.Test | ||
{ | ||
[SetUpFixture] | ||
public class CultureInfoSetupFixture | ||
{ | ||
[SetUp] | ||
public void SetCultureToSomethingNonLatinToEnsureCodeUnderTestDoesntAssumeEnAu() | ||
{ | ||
// Issue https://bitbucket.org/Readify/neo4jclient/issue/15/take-cultureinfo-into-account-for-proper | ||
|
||
// The idea is to minimize developer mistake by surprising culture-info assumptions. This may not be the best setup for culture-dependent | ||
// tests. The alternative of introducing test base class is deliberately not taken because deriving from it is another assumption by itself. | ||
var thread = Thread.CurrentThread; | ||
thread.CurrentCulture = thread.CurrentUICulture = new CultureInfo("zh-CN"); | ||
} | ||
} | ||
} | ||
using System.Globalization; | ||
using System.Threading; | ||
using NUnit.Framework; | ||
|
||
namespace Neo4jClient.Test | ||
{ | ||
[SetUpFixture] | ||
public class CultureInfoSetupFixture | ||
{ | ||
[SetUp] | ||
public void SetCultureToSomethingNonLatinToEnsureCodeUnderTestDoesntAssumeEnAu() | ||
{ | ||
// Issue https://bitbucket.org/Readify/neo4jclient/issue/15/take-cultureinfo-into-account-for-proper | ||
|
||
// The idea is to minimize developer mistake by surprising culture-info assumptions. This may not be the best setup for culture-dependent | ||
// tests. The alternative of introducing test base class is deliberately not taken because deriving from it is another assumption by itself. | ||
var thread = Thread.CurrentThread; | ||
thread.CurrentCulture = thread.CurrentUICulture = new CultureInfo("zh-CN"); | ||
} | ||
} | ||
} |
Oops, something went wrong.