1 5 6 package org.exoplatform.services.wsrp.testConsumer; 7 8 14 15 public class TestProducerRegistry extends BaseTest{ 16 17 public void testAddProducer(){ 18 producerRegistry.addProducer(producer); 19 assertTrue(producerRegistry.existsProducer(producer.getID())); 20 assertEquals(producer, producerRegistry.getAllProducers().next()); 21 } 22 23 public void testRemoveProducer() throws Exception { 24 producerRegistry.removeAllProducers(); 25 26 producerRegistry.addProducer(producer); 27 producerRegistry.removeAllProducers(); 28 assertTrue(!producerRegistry.getAllProducers().hasNext()); 29 30 producerRegistry.addProducer(producer); 31 producerRegistry.removeProducer(producer.getID()); 32 assertTrue(!producerRegistry.getAllProducers().hasNext()); 33 } 34 } 35 | Popular Tags |