assertEquals(2, _offeredTypes.length);
}
public void testObtainOfferedTypes_receiver_throws_NO_IMPLEMENT() throws Exception
{
final AtomicInteger offerChangeCalled = new AtomicInteger(0);
StructuredPushSender _sender = getPushSender();
StructuredPushReceiver _receiver = new StructuredPushReceiver(getClientORB())
{
public void offer_change(org.omg.CosNotification.EventType[] added,org.omg.CosNotification.EventType[] removed)
{
offerChangeCalled.incrementAndGet();
throw new NO_IMPLEMENT();
}
};
_sender.connect(channel_, false);
_receiver.connect(channel_, false);
_receiver.pushSupplier_.obtain_offered_types(ObtainInfoMode.NONE_NOW_UPDATES_ON);
EventType[] offers = new EventType[] { new EventType("domain1", "type1"),
new EventType("domain2", "type2") };
_sender.pushConsumer_.offer_change(offers, EMPTY_EVENT_TYPE);
offers = new EventType[] { new EventType("domain3", "type3"),
new EventType("domain4", "type4") };
_sender.pushConsumer_.offer_change(offers, EMPTY_EVENT_TYPE);
assertEquals(1, offerChangeCalled.get());
}