Exemplo n.º 1
0
        public void TestSuccesss()
        {
            var operationResultTr = new XDR.OperationResult.OperationResultTr();

            operationResultTr.Discriminant.InnerValue = XDR.OperationType.OperationTypeEnum.REVOKE_SPONSORSHIP;

            var result = new XDR.RevokeSponsorshipResult();

            result.Discriminant.InnerValue            = XDR.RevokeSponsorshipResultCode.RevokeSponsorshipResultCodeEnum.REVOKE_SPONSORSHIP_SUCCESS;
            operationResultTr.RevokeSponsorshipResult = result;

            Util.AssertResultOfType(Util.CreateTransactionResultXDR(operationResultTr), typeof(RevokeSponsorshipSuccess), true);
        }
Exemplo n.º 2
0
        public void TestLowReserve()
        {
            var operationResultTr = new XDR.OperationResult.OperationResultTr();

            operationResultTr.Discriminant.InnerValue = XDR.OperationType.OperationTypeEnum.REVOKE_SPONSORSHIP;

            var result = new XDR.RevokeSponsorshipResult();

            result.Discriminant.InnerValue            = XDR.RevokeSponsorshipResultCode.RevokeSponsorshipResultCodeEnum.REVOKE_SPONSORSHIP_LOW_RESERVE;
            operationResultTr.RevokeSponsorshipResult = result;

            Util.AssertResultOfType(Util.CreateTransactionResultXDR(operationResultTr), typeof(RevokeSponsorshipLowReserve), false);
        }
Exemplo n.º 3
0
        public void TestOnlyTransferable()
        {
            var operationResultTr = new XDR.OperationResult.OperationResultTr();

            operationResultTr.Discriminant.InnerValue = XDR.OperationType.OperationTypeEnum.REVOKE_SPONSORSHIP;

            var result = new XDR.RevokeSponsorshipResult();

            result.Discriminant.InnerValue            = XDR.RevokeSponsorshipResultCode.RevokeSponsorshipResultCodeEnum.REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE;
            operationResultTr.RevokeSponsorshipResult = result;

            Util.AssertResultOfType(Util.CreateTransactionResultXDR(operationResultTr), typeof(RevokeSponsorshipOnlyTransferable), false);
        }
Exemplo n.º 4
0
        public void TestDoesNotExist()
        {
            var operationResultTr = new XDR.OperationResult.OperationResultTr();

            operationResultTr.Discriminant.InnerValue = XDR.OperationType.OperationTypeEnum.REVOKE_SPONSORSHIP;

            var result = new XDR.RevokeSponsorshipResult();

            result.Discriminant.InnerValue            = XDR.RevokeSponsorshipResultCode.RevokeSponsorshipResultCodeEnum.REVOKE_SPONSORSHIP_DOES_NOT_EXIST;
            operationResultTr.RevokeSponsorshipResult = result;

            Util.AssertResultOfType(Util.CreateTransactionResultXDR(operationResultTr), typeof(RevokeSponsorshipDoesNotExist), false);
        }