Beispiel #1
0
    public User findUserByTemplate()
    {
        User user = new User();

        user.Name = "John Dow";
        return(proxy.Read <User>(user));
    }
Beispiel #2
0
    public void partialUpdate()
    {
        service.partialUpdate();

        User user = new User();

        user.Id = 1L;

        User u = proxy.Read(user);

        Assert.AreEqual(EAccountStatus.BLOCKED, u.Status);
    }
        public void postPayment()
        {
            // Create a payment
            Payment payment = new Payment();

            payment.CreatedDate   = new DateTime();
            payment.MerchantId    = 1L;
            payment.PaymentAmount = 120.70;
            payment.Status        = ETransactionStatus.NEW;


            Console.WriteLine(payment.Status);

            // write the payment into the space
            proxy.Write(payment);

            Thread.Sleep(10000);

            SqlQuery <Payment> query = new SqlQuery <Payment>("MerchantId=1");

            payment = proxy.Read <Payment>(query);

            Assert.AreEqual(payment.Status, ETransactionStatus.PROCESSED);

            Console.WriteLine(payment.Status);
        }
        private TickInfo.TickInfo ReadTick(String symbol)
        {
            // reading the TickInfo from the Space

            TickInfo.TickInfo template = new TickInfo.TickInfo();
            template.Symbol = symbol;

            TickInfo.TickInfo tick = _proxy.Read <TickInfo.TickInfo>(template);
            return(tick);
        }