Examples of TestBean


Examples of org.drools.core.util.asm.TestBean

    @Test
    public void testLong() throws Exception {
        final ClassFieldReader ext = store.getReader( TestBean.class,
                                                      "longField",
                                                      getClass().getClassLoader() );
        final TestBean bean = new TestBean();
        assertEquals( 424242,
                      ((Number) ext.getValue( null,
                                              bean )).longValue() );
    }
View Full Code Here

Examples of org.drools.util.asm.TestBean

    }

    public void testBasic() throws Exception {
        final Object[] objArray = new Object[1];

        final TestBean obj = new TestBean();
        obj.setBlah( false );
        obj.setSomething( "no" );
        obj.setObjArray( objArray );

        final ClassFieldReader ext = store.getReader( TestBean.class,
                                                      "blah",
                                                      getClass().getClassLoader() );
        assertEquals( false,
View Full Code Here

Examples of org.drools.util.asm.TestBean

    public void testLong() throws Exception {
        final ClassFieldReader ext = store.getReader( TestBean.class,
                                                      "longField",
                                                      getClass().getClassLoader() );
        final TestBean bean = new TestBean();
        assertEquals( 424242,
                      ((Number) ext.getValue( null,
                                              bean )).longValue() );
    }
View Full Code Here

Examples of org.drools.util.asm.TestBean

    }

    public void testNonExistentField() throws Exception {
        final Object[] objArray = new Object[1];

        final TestBean obj = new TestBean();
        obj.setBlah( false );
        obj.setSomething( "no" );
        obj.setObjArray( objArray );

        try {
            final ClassFieldReader ext = store.getReader( TestBean.class,
                                                          "xyz",
                                                          getClass().getClassLoader() );
View Full Code Here

Examples of org.easetech.easytest.annotation.TestBean

            Object classInstance = configClass.newInstance();
            loadResourceProperties(configClass, classInstance);

            Method[] methods = configClass.getDeclaredMethods();
            for (Method method : methods) {
                TestBean testBean = method.getAnnotation(TestBean.class);
                if (testBean != null) {
                    String beanName = testBean.value();
                    Class<?> beanType = method.getReturnType();
                    Object[] params = {};
                    Object object = method.invoke(classInstance, params);
                    if (!(beanName.length() <= 0)) {
                        ConfigContext.setTestBeanByName(beanName, object);
View Full Code Here

Examples of org.jboss.soa.esb.actions.TestBean

        String msg = "<" + TestBean.class.getSimpleName() + "> <name>Tom</name><phone>1234</phone></" + TestBean.class.getSimpleName() + ">";
       
        oMsg.getBody().add(msg);
        oMsg = xstreamToObject.process(oMsg);
      
        TestBean bean = (TestBean)oMsg.getBody().get();
 
        assertEquals("Tom", bean.getName());
        assertEquals("1234", bean.getPhone());
        
    }
View Full Code Here

Examples of org.jboss.test.security.microcontainer.metadata.support.TestBean

    * @throws Exception if an error occurs while running the tests.
    */
   public void testManagersInjection() throws Exception
   {
      // get the test bean and validate all mock managers have been injected.
      TestBean testBean = (TestBean) super.getBean("TestBean");
      assertNotNull("TestBean could not be found", testBean);

      // check the authentication manager injection.
      AuthenticationManager authenticationManager = testBean.getAuthenticationManager();
      assertNotNull("Invalid null AuthenticationManager found", authenticationManager);
      assertEquals("Invalid AuthenticationManager implementation found", MockAuthenticationManager.class,
            authenticationManager.getClass());
      assertEquals("TestPolicy1", authenticationManager.getSecurityDomain());

      // check the authorization manager injection.
      AuthorizationManager authorizationManager = testBean.getAuthorizationManager();
      assertNotNull("Invalid null AuthorizationManager found", authorizationManager);
      assertEquals("Invalid AuthorizationManager implementation found", MockAuthorizationManager.class,
            authorizationManager.getClass());
      assertEquals("TestPolicy1", authorizationManager.getSecurityDomain());

      // check the mapping manager injection.
      MappingManager mappingManager = testBean.getMappingManager();
      assertNotNull("Invalid null MappingManager found", mappingManager);
      assertEquals("Invalid MappingManager implementation found", MockMappingManager.class, mappingManager.getClass());
      assertEquals("TestPolicy1", mappingManager.getSecurityDomain());

      // check the audit manager injection.
      AuditManager auditManager = testBean.getAuditManager();
      assertNotNull("Invalid null AuditManager found", auditManager);
      assertEquals("Invalid AuditManager implementation found", MockAuditManager.class, auditManager.getClass());
      assertEquals("TestPolicy1", auditManager.getSecurityDomain());

      // check the identity-trust injection.
      IdentityTrustManager trustManager = testBean.getIdentityTrustManager();
      assertNotNull("Invalid null IdentityTrustManager found", trustManager);
      assertEquals("Invalid IdentityTrustManager implementation found", MockIdentityTrustManager.class, trustManager
            .getClass());
      assertEquals("TestPolicy1", trustManager.getSecurityDomain());

View Full Code Here

Examples of org.jmxdatamart.JMXTestServer.TestBean

        mbs.unregisterMBean(mS);
    }
   
    @Test
    public void testSameLevelPattern() throws Exception{
        TestBean tb = new TestBean();
        tb.setA(new Integer(42));
        tb.setB(new Long(8));
        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        String mbName = "org.jmxdatamart.JMXTestServer:type=TestBean";
        ObjectName mbeanName = new ObjectName(mbName);
        mbs.registerMBean(tb, mbeanName);
       
View Full Code Here

Examples of org.logicblaze.lingo.beans.TestBean

    protected JmsServiceExporter exporter;
    protected JmsProxyFactoryBean pfb;


    public void testJmsProxyFactoryBeanAndServiceExporter() throws Throwable {
        TestBean target = new TestBean("myname", 99);
        exporter = new JmsServiceExporter();
        exporter.setServiceInterface(ITestBean.class);
        exporter.setService(target);
        exporter.setProducer(createJmsProducer());
        configure(exporter);
View Full Code Here

Examples of org.logicblaze.lingo.beans.TestBean

            // expected
        }
    }

    public void testJmsProxyFactoryBeanAndServiceExporterUsingSimpleConfiguration() throws Throwable {
        TestBean target = new TestBean("myname", 99);
        exporter = new JmsServiceExporter();
        exporter.setServiceInterface(ITestBean.class);
        exporter.setService(target);
        exporter.setConnectionFactory(connectionFactory);
        configure(exporter);
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.