Skip to content

Commit

Permalink
[GRAPHDB-484] improvements and fixes related to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Zorn committed Oct 25, 2011
1 parent 33a0d03 commit 2f8da03
Show file tree
Hide file tree
Showing 6 changed files with 6,357 additions and 7 deletions.
6,314 changes: 6,314 additions & 0 deletions Applications/TagExampleWithGraphMappingFramework/some.wsdl

Large diffs are not rendered by default.

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using sones.Library.ErrorHandling;

namespace sones.GraphDS.GraphDSRemoteClient.ErrorHandling
{
public class RemoteException : ASonesException
{
private String _msg;

public RemoteException(String myMessage)
{
_msg = myMessage;
}

public override string Message
{
get { return _msg; }
}
}
}
Expand Up @@ -43,6 +43,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ConvertHelper.cs" />
<Compile Include="ErrorHandling\RemoteException.cs" />
<Compile Include="GraphDS_RemoteClient.cs" />
<Compile Include="GraphElements\ARemoteBaseType.cs" />
<Compile Include="GraphElements\ARemoteEdge.cs" />
Expand Down
Expand Up @@ -17,6 +17,7 @@
using sones.Library.PropertyHyperGraph;
using System.ServiceModel.Description;
using System.Xml;
using sones.GraphDS.GraphDSRemoteClient.ErrorHandling;

namespace sones.GraphDS.GraphDSRemoteClient
{
Expand Down
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using sones.GraphQL.Result;
using sones.GraphDS.GraphDSRemoteClient.ErrorHandling;

namespace sones.GraphDS.GraphDSRemoteClient.sonesGraphDSRemoteAPI
{
Expand All @@ -11,11 +12,22 @@ public partial class ServiceQueryResult
internal QueryResult ToQueryResult(IServiceToken myServiceToken)
{
ResultType type;
if(this.TypeOfResult == ServiceResultType.Successful)
if (this.TypeOfResult == ServiceResultType.Successful)
{
type = ResultType.Successful;
}
else
{
type = ResultType.Failed;
return new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)));
}
if (!String.IsNullOrEmpty(this.Error))
{
return new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)), new RemoteException(this.Error));
}
else
{
return new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)));
}
}
}
}
Expand Up @@ -27,6 +27,7 @@
using sones.GraphDS.Services.RemoteAPIService.DataContracts.InstanceObjects;
using sones.GraphDS.Services.RemoteAPIService.DataContracts.ServiceTypeManagement;
using sones.GraphDB.TypeSystem;
using sones.Library.ErrorHandling;

namespace sones.GraphDS.Services.RemoteAPIService.DataContracts.QueryResult
{
Expand All @@ -38,11 +39,9 @@ public ServiceQueryResult(sones.GraphQL.Result.QueryResult myQueryResult)
{
this.Duration = myQueryResult.Duration;
if (myQueryResult.Error != null)
if (myQueryResult.Error.Message != null)
this.Error = myQueryResult.Error.Message;
else
this.Error = myQueryResult.Error.InnerException.Message;

this.Error = myQueryResult.Error.Message;
else
this.Error = null;
this.NameOfQueryLanguage = myQueryResult.NameOfQuerylanguage;
this.NumberOfAffectedVertices = myQueryResult.NumberOfAffectedVertices;
this.Query = myQueryResult.Query;
Expand Down

0 comments on commit 2f8da03

Please sign in to comment.