Ejemplo n.º 1
0
 public void GetSigningKeyAsyncCallResultShouldBe(
     string signingKey)
 {
     _scenarioContext
     .GetCallResult <SigningKey>()
     .ShouldBe(SigningKey.Parse(signingKey));
 }
Ejemplo n.º 2
0
 public async Task VASPSetItsContractSigningKeyTo(
     string signingKey)
 {
     await _scenarioContext
     .GetContractByType <VASPContract>()
     .SetSigningKeyAsync
     (
         owner: await _accounts.GetOwnerAsync(),
         signingKey: SigningKey.Parse(signingKey)
     );
 }
Ejemplo n.º 3
0
 public Task VASPSetItsContractSigningKeyTo(
     string signingKey)
 {
     return(_scenarioContext
            .GetContractByType <VASPContract>()
            .SetSigningKey
            (
                owner: _accounts.Owner,
                signingKey: SigningKey.Parse(signingKey)
            ));
 }
Ejemplo n.º 4
0
        public void SpecifiedPropertyOfTheGetVASPInfoAsyncCallResultShouldBe(
            string propertyName,
            string propertyValue)
        {
            var callResult = _scenarioContext.GetCallResult <VASPInfo>();

            switch (propertyName)
            {
            case "Channels":
                callResult.Channels
                .ShouldBe(Channels.Parse(propertyValue));
                break;

            case "MessageKey":
                callResult.MessageKey
                .ShouldBe(MessageKey.Parse(propertyValue));
                break;

            case "SigningKey":
                callResult.SigningKey
                .ShouldBe(SigningKey.Parse(propertyValue));
                break;

            case "TransportKey":
                callResult.TransportKey
                .ShouldBe(TransportKey.Parse(propertyValue));
                break;

            case "VASPCode":
                callResult.VASPCode
                .ShouldBe(VASPCode.Parse(propertyValue));
                break;

            default:
                throw new ArgumentException("Unexpected property name", nameof(propertyName));
            }
        }
Ejemplo n.º 5
0
        // ReSharper disable once InconsistentNaming
        public async Task ICallCreateVASPContractAsyncMethodOfVASPIndexClientWithGivenParameters()
        {
            var vaspIndex       = _scenarioContext.GetContractByType <VASPIndex>();
            var vaspIndexClient = new VASPIndexClient
                                  (
                vaspIndex.RealAddress,
                _estimateGasPriceStrategy,
                _web3
                                  );

            var callResult = await vaspIndexClient.CreateVASPContractAsync
                             (
                from : await _accounts.GetDeployerAsync(),
                vaspCode : VASPCode.Parse(_scenarioContext.GetParameter("vaspCode")),
                owner : Address.Parse(_scenarioContext.GetParameter("owner")),
                channels : Channels.Parse(_scenarioContext.GetParameter("channels")),
                transportKey : TransportKey.Parse(_scenarioContext.GetParameter("transportKey")),
                messageKey : MessageKey.Parse(_scenarioContext.GetParameter("messageKey")),
                signingKey : SigningKey.Parse(_scenarioContext.GetParameter("signingKey")),
                minimalConfirmationLevel : ConfirmationLevel.Parse(_scenarioContext.GetParameter("minimalConfirmationLevel"))
                             );

            _scenarioContext.SetCallResult(callResult);
        }