Esempio n. 1
0
        public void Test_run_return_dict()
        {
            DBConnection db = new DBConnection();

            db.connect(SERVER, PORT);
            BasicDictionary dict = (BasicDictionary)db.run("dict(1 2 3, 2.3 3.4 5.5)");
            BasicDouble     v    = (BasicDouble)dict.get(new BasicInt(2));

            Assert.AreEqual(3.4, v.getValue());
        }
Esempio n. 2
0
        public void Test_Function_Double()
        {
            DBConnection db = new DBConnection();

            db.connect(SERVER, PORT);
            List <IEntity>    args = new List <IEntity>(1);
            BasicDoubleVector vec  = new BasicDoubleVector(3);

            vec.setDouble(0, 1.5);
            vec.setDouble(1, 2.5);
            vec.setDouble(2, 7);

            args.Add(vec);
            BasicDouble result = (BasicDouble)db.run("sum", args);

            Assert.AreEqual(11, result.getValue());
        }