Package org.springmodules.jsr94.factory

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

package org.springmodules.jsr94.factory;

import javax.rules.admin.RuleAdministrator;

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

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

    RuleAdministrator administrator = (RuleAdministrator) bean.getObject();
    assertNotNull("Created RuleAdministrator is null", administrator);
  }

}
TOP

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

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.