示例#1
0
        public ActionResult UpdatePoint(PointTO point)
        {
            //Get Cube
            IGCube cube = GeometryFactory.GetCube();

            return(Json(new { success = cube.Update(point) }, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        public void Cube_CreateUpdateAndSumException()
        {
            IGCube cube = Geometry.GeometryFactory.GetCube();

            cube.Create(2);
            cube.Update(new RappiChallenge.TO.PointTO()
            {
                X = 1, Y = 5, Z = 1, Value = 15
            });

            Assert.AreEqual(
                cube.SumRegion(
                    new RappiChallenge.TO.PointTO()
            {
                X = 1, Y = 1, Z = 1
            },
                    new RappiChallenge.TO.PointTO()
            {
                X = 2, Y = 2, Z = 2
            })
                , Convert.ToDouble(10));
        }