Package org.springmodules.jsr94.factory

Source Code of org.springmodules.jsr94.factory.RuleRuntimeFactoryBeanTests

package org.springmodules.jsr94.factory;

import javax.rules.RuleRuntime;

/**
* @author janm
*
*/
public class RuleRuntimeFactoryBeanTests extends AbstractRuleServiceProviderTests {

  /**
   * Tests the getObject() and afterPropertiesSet() methods
   */
  public void testGetObject() throws Exception {
    RuleRuntimeFactoryBean bean = new RuleRuntimeFactoryBean();
    try {
      bean.afterPropertiesSet();
      fail("serviceProvider not set");
    }
    catch (IllegalArgumentException ex) {
      // expected
    }
    bean.setServiceProvider(getProvider());
    bean.afterPropertiesSet();

    RuleRuntime runtime = (RuleRuntime) bean.getObject();
    assertNotNull("Created RuleRuntime is null", runtime);
  }
}
TOP

Related Classes of org.springmodules.jsr94.factory.RuleRuntimeFactoryBeanTests

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.