示例#1
0
 public void VASPCredentialsHashPropertyOfGetCredentialsRefAndHashAsyncCallResultShouldBe(
     string expectedResult)
 {
     _scenarioContext
     .GetCallResult <VASPCredentialsRefAndHash>()
     .Hash
     .ShouldBe(VASPCredentialsHash.Parse(expectedResult));
 }
示例#2
0
        // ReSharper disable once InconsistentNaming
        public void ICallValidateCredentialsOfflineMethodOfVASPRegistryClient(
            string credentialsExamplePath,
            string credentialsHash)
        {
            var callResult = VASPRegistryClient.ValidateCredentialsOffline
                             (
                credentials: File.ReadAllText(credentialsExamplePath),
                credentialsHash: VASPCredentialsHash.Parse(credentialsHash)
                             );

            _scenarioContext.SetCallResult(callResult);
        }
示例#3
0
        public void VASPCredentialsRefAndHashPropertyOfTheTryGetCredentialsRefAndHashAsyncCallResultShouldBe(
            string expectedRef,
            string expectedHash)
        {
            var(actualRef, actualHash) = _scenarioContext
                                         .GetCallResult <(bool VASPIsRegistered, VASPCredentialsRefAndHash VASPCredentialsRefAndHash)>()
                                         .VASPCredentialsRefAndHash;

            actualRef
            .ShouldBe(new VASPCredentialsRef(expectedRef));

            actualHash
            .ShouldBe(VASPCredentialsHash.Parse(expectedHash));
        }
示例#4
0
        // ReSharper disable once InconsistentNaming
        public async Task ICallValidateCredentialsAsyncMethodOfVASPDirectoryClient(
            string credentialsExamplePath,
            string credentialsHash)
        {
            var vaspDirectory       = _scenarioContext.GetContractByType <VASPDirectory>();
            var vaspDirectoryClient = new EtherGate.VASPDirectoryClient(vaspDirectory.RealAddress, _web3);

            var callResult = await vaspDirectoryClient.ValidateCredentialsAsync
                             (
                credentials : await File.ReadAllTextAsync(credentialsExamplePath),
                credentialsHash : VASPCredentialsHash.Parse(credentialsHash)
                             );

            _scenarioContext.SetCallResult(callResult);
        }