public ActionResult Create(int dimensions)
        {
            //Get Cube
            IGCube cube = GeometryFactory.GetCube();

            return(Json(new { success = cube.Create(dimensions) }, JsonRequestBehavior.AllowGet));
        }
Beispiel #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));
        }