public void ShouldSuccesfullyEvaluateDecimalCastRegardlessOfCulture()
        {
            foreach (var ci in TestedCultureInfos)
            {
                TestTools.ExecuteWithChangedCulture(ci, () =>
                {
                    // given
                    var cast = new DecimalCast(new ConstantTerm(3.4m.ToLiteral(_graph)));

                    // when
                    IValuedNode valuedNode = cast.Evaluate(new SparqlEvaluationContext(new SparqlQuery(), new InMemoryDataset()), 0);

                    // then
                    Assert.AreEqual(3.4m, valuedNode.AsDecimal());
                });
            }
        }
        public Task <IceRequestResult> WithdrawAsync(IceSymbol symbol, string address, DecimalCast amount, Guid?feeQuoteId = null)
        {
            var data = new IceCreateWithdrawalRequest {
                Address = address, Amount = amount, FeeQuoteId = feeQuoteId
            };

            return(_client.ApiUtility.Post <IceRequestResult>($"/withdraw/{symbol.Name}", data));
        }
示例#3
0
        public Task <IceRequestResult> CreateOrderAsync(IceSymbolPair symbolPair, OrderType type, DecimalCast amount, DecimalCast price)
        {
            var data = new IceCreateOrder {
                Amount = amount, Price = price, Type = type
            };

            return(_client.ApiUtility.Post <IceRequestResult>($"/order/{symbolPair.Name}", data));
        }
 public IceRequestResult Withdraw(IceSymbol symbol, string address, DecimalCast amount, Guid?feeQuoteId = null) => WithdrawAsync(symbol, address, amount, feeQuoteId).Result;
示例#5
0
 public IceRequestResult CreateOrder(IceSymbolPair symbolPair, OrderType type, DecimalCast amount, DecimalCast price) => CreateOrderAsync(symbolPair, type, amount, price).Result;