KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > jms > MockTemporaryQueue


1 package com.mockobjects.jms;
2
3 import javax.jms.JMSException JavaDoc;
4 import javax.jms.TemporaryQueue JavaDoc;
5 import com.mockobjects.ExpectationCounter;
6
7 public class MockTemporaryQueue extends MockQueue implements TemporaryQueue JavaDoc {
8
9     private final ExpectationCounter myDeleteCalls = new ExpectationCounter("MockTemporaryQueue.delete");
10
11     public void delete() throws JMSException JavaDoc {
12         myDeleteCalls.inc();
13         throwExceptionIfAny();
14     }
15
16     public void setExpectedDeleteCalls(int callCount) {
17         myDeleteCalls.setExpected(callCount);
18     }
19 }
20
Popular Tags