Beispiel #1
0
        public void createSpringMvcControllerFromXmlAttributeFile()
        {
            Assert.That(File.Exists(expectedSpringMvcAttributeXmlFile), "expected expectedSpringMvcAttributeXmlFile does not exist: {0}", expectedSpringMvcAttributeXmlFile);
            var springMvcControllers = LoadSpringMvcData.createSpringMvcControllersFromXmlAttributeFile(expectedSpringMvcAttributeXmlFile);

            Assert.That(springMvcControllers.Count > 1, "there should be one springMvcController returned");
            var springMvcController = springMvcControllers[0];

            Assert.That(springMvcController.JavaClass == expectedClassName, "springMvcController.ClassName did not match expectedClassName: {0}", expectedClassName);
        }
Beispiel #2
0
        [Test]  // the errors that will appear in the logs are because we are not loading the CIR data file, for example "getTreeNodeWithAutoWiredObject, loaded cirData did not contained signature :org.springframework.samples.petclinic.web.EditOwnerForm.setupForm(int;org.springframework.ui.Model):java.lang.String"
        public void viewSpringMvcControllersObjectOnGui()
        {
            if (false == File.Exists(expectedSpringMvcAttributeXmlFile))
            {
                AnnotationsHelper.executeJythonScript(testSpringMvcClassFile);
            }
            // create controllers
            var springMvcControllers = LoadSpringMvcData.createSpringMvcControllersFromXmlAttributeFile(expectedSpringMvcAttributeXmlFile);
            // create Gui
            var viewSpringMvcControllerName = "ascx_CreateSpringMvcMappings";

            O2AscxGUI.openAscxAsForm(typeof(ascx_SpringMvcMappings), viewSpringMvcControllerName);
            var springMvcMappings = (ascx_SpringMvcMappings)O2AscxGUI.getAscx(viewSpringMvcControllerName);

            // load controllers on gui
            springMvcMappings.showSpringMvcControllers(springMvcControllers);
            O2AscxGUI.close();
            //viewSpringMvcController
        }
Beispiel #3
0
        public List <SpringMvcController> createSpringMvcControlersObjectsFromXmlFiles(List <String> filesToProcess)
        {
            var springMvcControllers = new List <SpringMvcController>();

            foreach (var file in filesToProcess)
            {
                switch (Path.GetExtension(file).ToLower())
                {
                case ".xml":
                    springMvcControllers.AddRange(
                        LoadSpringMvcData.createSpringMvcControllersFromXmlAttributeFile(file));
                    break;

                //case ".cirdata":
                //    loadCirDataFile(file);
                //    break;
                default:
                    break;
                }
            }
            return(springMvcControllers);
        }