예제 #1
0
        public void GisEntity_EntityController_InsertValidation()
        {
            using (GisEntityController controller = new GisEntityController())
            {
                controller.StartEdit();
                GisEntity entity = controller.Single("FLTE");

                using (GisValidationController valController = new GisValidationController())
                {
                    valController.StartEdit();

                    Assert.AreEqual(6, entity.Validations.Count);

                    GisValidation validation = valController.Create();
                    validation.EntityCode          = "FLTE";
                    validation.ValidatioName       = "Teste Validação";
                    validation.ValidationFieldName = "TESTE";
                    valController.Update(validation);

                    Assert.AreEqual(7, entity.Validations.Count);

                    valController.Delete(validation);
                }
            }
            Console.WriteLine("Teste Dispose");
        }
예제 #2
0
        public void GisEntity_EntityController_SinglePrimaryKey()
        {
            GisEntityController controller = new GisEntityController();
            GisEntity           entity     = controller.Single("TENT");

            Assert.AreEqual("TENT", entity.EntityCode);
            Assert.AreEqual("Entidades", entity.EntityName);
            Assert.AreEqual(String.Empty, entity.EntityFeatureDataset);
            Assert.AreEqual("TENT_ENTIDADES", entity.EntityFeatureClass);
            Assert.AreEqual(String.Empty, entity.EntityClassExtension);
            Assert.AreEqual(99, entity.EntityLevel);
            Assert.AreEqual(5, entity.EntityRanking);
            Assert.AreEqual("Alfanumérica", entity.EntityType);
        }
예제 #3
0
        public void GisEntity_EntityController_SetValue()
        {
            GisEntityController controller = new GisEntityController();

            controller.StartEdit();
            GisEntity entity = controller.Single("TENT");

            Assert.AreEqual("TENT", entity.EntityCode);
            Assert.AreEqual("Entidades", entity.EntityName);
            Assert.AreEqual(String.Empty, entity.EntityFeatureDataset);
            Assert.AreEqual("TENT_ENTIDADES", entity.EntityFeatureClass);
            Assert.AreEqual(String.Empty, entity.EntityClassExtension);
            Assert.AreEqual(99, entity.EntityLevel);
            Assert.AreEqual(5, entity.EntityRanking);
            Assert.AreEqual("Alfanumérica", entity.EntityType);

            #region settting the values
            entity.EntityFeatureDataset = "TESTE_SET";
            Assert.AreEqual("TESTE_SET", entity.EntityFeatureDataset);

            entity.EntityType = "Georreferenciada";
            Assert.AreEqual("Georreferenciada", entity.EntityType);

            controller.Update(entity);
            #endregion

            #region setting them back
            entity.EntityFeatureDataset = String.Empty;
            Assert.AreEqual(String.Empty, entity.EntityFeatureDataset);

            entity.EntityType = "Alfanumérica";
            Assert.AreEqual("Alfanumérica", entity.EntityType);

            controller.Update(entity);
            #endregion

            controller.StopEdit(true);
        }
        public void GisEntity_EntityController_SinglePrimaryKey()
        {
            GisEntityController controller = new GisEntityController();
            GisEntity entity = controller.Single("TENT");

            Assert.AreEqual("TENT", entity.EntityCode);
            Assert.AreEqual("Entidades", entity.EntityName);
            Assert.AreEqual(String.Empty, entity.EntityFeatureDataset);
            Assert.AreEqual("TENT_ENTIDADES", entity.EntityFeatureClass);
            Assert.AreEqual(String.Empty, entity.EntityClassExtension);
            Assert.AreEqual(99, entity.EntityLevel);
            Assert.AreEqual(5, entity.EntityRanking);
            Assert.AreEqual("Alfanumérica", entity.EntityType);
        }
        public void GisEntity_EntityController_SetValue()
        {
            GisEntityController controller = new GisEntityController();
            controller.StartEdit();
            GisEntity entity = controller.Single("TENT");

            Assert.AreEqual("TENT", entity.EntityCode);
            Assert.AreEqual("Entidades", entity.EntityName);
            Assert.AreEqual(String.Empty, entity.EntityFeatureDataset);
            Assert.AreEqual("TENT_ENTIDADES", entity.EntityFeatureClass);
            Assert.AreEqual(String.Empty, entity.EntityClassExtension);
            Assert.AreEqual(99, entity.EntityLevel);
            Assert.AreEqual(5, entity.EntityRanking);
            Assert.AreEqual("Alfanumérica", entity.EntityType);

            #region settting the values
            entity.EntityFeatureDataset = "TESTE_SET";
            Assert.AreEqual("TESTE_SET", entity.EntityFeatureDataset);

            entity.EntityType = "Georreferenciada";
            Assert.AreEqual("Georreferenciada", entity.EntityType);

            controller.Update(entity);
            #endregion

            #region setting them back
            entity.EntityFeatureDataset = String.Empty;
            Assert.AreEqual(String.Empty, entity.EntityFeatureDataset);

            entity.EntityType = "Alfanumérica";
            Assert.AreEqual("Alfanumérica", entity.EntityType);

            controller.Update(entity);
            #endregion

            controller.StopEdit(true);
        }
        public void GisEntity_EntityController_InsertValidation()
        {
            using (GisEntityController controller = new GisEntityController())
            {
                controller.StartEdit();
                GisEntity entity = controller.Single("FLTE");

                using (GisValidationController valController = new GisValidationController())
                {
                    valController.StartEdit();

                    Assert.AreEqual(6, entity.Validations.Count);

                    GisValidation validation = valController.Create();
                    validation.EntityCode = "FLTE";
                    validation.ValidatioName = "Teste Validação";
                    validation.ValidationFieldName = "TESTE";
                    valController.Update(validation);

                    Assert.AreEqual(7, entity.Validations.Count);

                    valController.Delete(validation);
                }
            }
            Console.WriteLine("Teste Dispose");
        }
 public void GisEntity_EntityController_InexistentSingle()
 {
     GisEntityController controller = new GisEntityController();
     GisEntity entity = controller.Single("TST");
 }
예제 #8
0
 public void GisEntity_EntityController_InexistentSingle()
 {
     GisEntityController controller = new GisEntityController();
     GisEntity           entity     = controller.Single("TST");
 }