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