public void VASPCredentialsHashPropertyOfGetCredentialsRefAndHashAsyncCallResultShouldBe(
     string expectedResult)
 {
     _scenarioContext
     .GetCallResult <VASPCredentialsRefAndHash>()
     .Hash
     .ShouldBe(VASPCredentialsHash.Parse(expectedResult));
 }
        // 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);
        }
        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));
        }
Exemple #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);
        }