-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[net]tests(remoting): introduce some basic tests for RemotingViaNodeC…
…lient (#668)
- Loading branch information
1 parent
702710a
commit 98e0325
Showing
11 changed files
with
191 additions
and
36 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
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
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
17 changes: 17 additions & 0 deletions
17
net/src/Substrate.Gear.Client/GearApi/Model/gprimitives/ActorIdExtensions.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Linq; | ||
using EnsureThat; | ||
using Substrate.NetApi; | ||
|
||
namespace Substrate.Gear.Client.GearApi.Model.gprimitives; | ||
|
||
public static class ActorIdExtensions | ||
{ | ||
public static string ToHexString(this Api.Generated.Model.gprimitives.ActorId actorId) | ||
{ | ||
EnsureArg.IsNotNull(actorId, nameof(actorId)); | ||
EnsureArg.IsNotNull(actorId.Value, "actorId.Value"); | ||
EnsureArg.IsNotNull(actorId.Value.Value, "actorId.Value.Value"); | ||
|
||
return Utils.Bytes2HexString(actorId.Value.Value.Select(u8 => u8.Value).ToArray()); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
net/src/Substrate.Gear.Client/GearApi/Model/gprimitives/CodeIdExtensions.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Linq; | ||
using EnsureThat; | ||
using Substrate.NetApi; | ||
|
||
namespace Substrate.Gear.Client.GearApi.Model.gprimitives; | ||
|
||
public static class CodeIdExtensions | ||
{ | ||
public static string ToHexString(this Api.Generated.Model.gprimitives.CodeId codeId) | ||
{ | ||
EnsureArg.IsNotNull(codeId, nameof(codeId)); | ||
EnsureArg.IsNotNull(codeId.Value, "codeId.Value"); | ||
EnsureArg.IsNotNull(codeId.Value.Value, "codeId.Value.Value"); | ||
|
||
return Utils.Bytes2HexString(codeId.Value.Value.Select(u8 => u8.Value).ToArray()); | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
global using System; | ||
global using System.Collections.Generic; | ||
global using System.IO; | ||
global using System.Linq; | ||
global using System.Text.RegularExpressions; | ||
global using System.Threading; | ||
global using System.Threading.Tasks; | ||
global using EnsureThat; | ||
global using FluentAssertions; | ||
global using Microsoft.Extensions.DependencyInjection; | ||
global using Sails.Remoting.Abstractions.Core; | ||
global using Sails.Remoting.Core; | ||
global using Sails.Remoting.DependencyInjection; | ||
global using Sails.Remoting.Options; | ||
global using Sails.Tests.Shared.Containers; | ||
global using Sails.Tests.Shared.Git; | ||
global using Sails.Tests.Shared.XUnit; | ||
global using Xunit; | ||
global using Xunit.Abstractions; |
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
12 changes: 1 addition & 11 deletions
12
net/tests/Sails.Remoting.Tests/_Infra/XUnit/Fixtures/SailsFixture.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
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