Examples of ConfigurationParser


Examples of org.mybatis.generator.config.xml.ConfigurationParser

    }

    @Test
    public void testGenerateIbatis2() throws Exception {
        List<String> warnings = new ArrayList<String>();
        ConfigurationParser cp = new ConfigurationParser(warnings);
        Configuration config = cp.parseConfiguration(this.getClass().getClassLoader().getResourceAsStream("generatorConfigIbatis2.xml"));
           
        DefaultShellCallback shellCallback = new DefaultShellCallback(true);
       
        boolean gotException = false;
        try {
View Full Code Here

Examples of org.mybatis.generator.config.xml.ConfigurationParser

  }

  public void main1(String fileName) {
    try {
      List<String> warnings = new ArrayList<String>();
      ConfigurationParser cp = new ConfigurationParser(warnings);
      Configuration config = cp
          .parseConfiguration(this.getClass().getClassLoader().getResourceAsStream(fileName));

      DefaultShellCallback shellCallback = new DefaultShellCallback(true);

      MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, shellCallback, warnings);
View Full Code Here

Examples of org.soybeanMilk.core.config.parser.ConfigurationParser

  public void tearDown() throws Exception{}
 
  @Test
  public void parse_genericConverter_noClassAttr() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-genericConverter-noClassAttr.xml");
   
    GenericConverter gc=config.getGenericConverter();
   
    Assert.assertEquals(DefaultGenericConverter.class, gc.getClass());
    Assert.assertEquals(TestConverter.class, gc.getConverter(String.class, int.class).getClass());
View Full Code Here

Examples of org.soybeanMilk.core.config.parser.ConfigurationParser

  }
 
  @Test
  public void parse_genericConverter_hasClassAttr() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-genericConverter-hasClassAttr.xml");
   
    GenericConverter gc=config.getGenericConverter();
   
    Assert.assertEquals(MyGenericConverter.class, gc.getClass());
  }
View Full Code Here

Examples of org.soybeanMilk.core.config.parser.ConfigurationParser

  }
 
  @Test
  public void parse_interceptor() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-main.xml");
   
    Interceptor ii=config.getInterceptor();
   
    Assert.assertTrue(config.getExecutable("global_before") == ii.getBefore());
    Assert.assertTrue(config.getExecutable("global_after") == ii.getAfter());
View Full Code Here

Examples of org.soybeanMilk.core.config.parser.ConfigurationParser

  }
 
  @Test
  public void parse_includes() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-main.xml");
   
    ResolverObjectFactory rf=config.getResolverObjectFactory();
    Assert.assertNotNull(rf.getResolverObject("tr"));
    Assert.assertNotNull(rf.getResolverObject("tr1"));
    Assert.assertNotNull(rf.getResolverObject("tr2"));
View Full Code Here

Examples of org.soybeanMilk.core.config.parser.ConfigurationParser

  }
 
  @Test
  public void parse_resolvers() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-main.xml");
   
    ResolverObjectFactory rf=config.getResolverObjectFactory();
    Assert.assertEquals(TestResolver.class, rf.getResolverObject("tr").getClass());
    Assert.assertEquals(TestResolver.class, rf.getResolverObject("tr1").getClass());
    Assert.assertEquals(TestResolver.class, rf.getResolverObject("tr2").getClass());
View Full Code Here

Examples of org.soybeanMilk.core.config.parser.ConfigurationParser

  }
 
  @Test
  public void parse_executables_emptyName() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-main.xml");
   
    Action exe0=(Action)config.getExecutable("global_");
    Assert.assertNotNull(exe0);
   
    Action exe1=(Action)config.getExecutable("m1_");
View Full Code Here

Examples of org.soybeanMilk.core.config.parser.ConfigurationParser

  }

  @Test
  public void parse_executables_multiExecutables() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-main.xml");
   
    Action exe0=(Action)config.getExecutable("another_exe1");
    Assert.assertNotNull(exe0);
   
    List<Executable> inners=exe0.getExecutables();
View Full Code Here

Examples of org.soybeanMilk.core.config.parser.ConfigurationParser

  }
 
  @Test
  public void parse_executables_action() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-main.xml");
   
    {
      Action exe=(Action)config.getExecutable("global_exe0");
      Assert.assertNull(exe.getExecutables());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.