Package org.soybeanMilk.core.config.parser

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


  }
 
  @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

  }
 
  @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

  }
 
  @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

  }
 
  @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

  }
 
  @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

  }

  @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

  }
 
  @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

  }

  @Test
  public void parse_executables_invoke_noArgNoResult() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-main.xml");
   
    Invoke exe=(Invoke)config.getExecutable("global_before");
   
    Resolver rp=exe.getResolver();
    Assert.assertEquals(DynamicResolver.class, rp.getClass());
View Full Code Here

  }
 
  @Test
  public void parse_executables_invoke_hasArgHasResult() throws Exception
  {
    config=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestConfigurationParser-main.xml");
   
    Invoke exe=(Invoke)config.getExecutable("global_exe3");
   
    Assert.assertEquals("result", exe.getResultKey());
    Resolver rp=exe.getResolver();
View Full Code Here

TOP

Related Classes of org.soybeanMilk.core.config.parser.ConfigurationParser

Copyright © 2018 www.massapicom. 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.