1 package org.jacorb.test.notification.plugins; 2 3 22 23 import junit.framework.Test; 24 25 import org.jacorb.notification.filter.bsh.BSHFilter; 26 import org.jacorb.test.notification.common.NotifyServerTestCase; 27 import org.jacorb.test.notification.common.NotifyServerTestSetup; 28 import org.omg.CosNotifyFilter.Filter; 29 import org.omg.CosNotifyFilter.FilterFactory; 30 31 35 public class FilterFactoryTest extends NotifyServerTestCase 36 { 37 private FilterFactory objectUnderTest_; 38 39 public void setUpTest() throws Exception 40 { 41 objectUnderTest_ = getDefaultChannel().default_filter_factory(); 42 } 43 44 public FilterFactoryTest(String name, NotifyServerTestSetup setup) 45 { 46 super(name, setup); 47 } 48 49 public void testCreateBSHFilter() throws Exception 50 { 51 Filter _filter = objectUnderTest_.create_filter(BSHFilter.CONSTRAINT_GRAMMAR); 52 53 assertEquals(BSHFilter.CONSTRAINT_GRAMMAR, _filter.constraint_grammar()); 54 } 55 56 public void testCreateNonExisting() throws Exception 57 { 58 try 59 { 60 objectUnderTest_.create_filter("ACME"); 61 fail(); 62 } catch (Exception e) 63 { 64 } 66 } 67 68 public static Test suite() throws Exception 69 { 70 return NotifyServerTestCase.suite(FilterFactoryTest.class); 71 } 72 } | Popular Tags |