KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.mockobjects.jms;
2
3 import com.mockobjects.*;
4
5 import javax.jms.*;
6
7 public class MockTextMessage extends MockMessage implements TextMessage {
8
9     private final ExpectationValue myExpectedText = new ExpectationValue("MockTextMessage.setText");
10     private final ReturnValue myText = new ReturnValue("text");
11
12     public void setText(String JavaDoc text) {
13         myExpectedText.setActual(text);
14     }
15
16     public String JavaDoc getText() {
17         return (String JavaDoc)myText.getValue();
18     }
19
20     public void setupGetText(String JavaDoc text) {
21         myText.setValue(text);
22     }
23
24     public void setExpectedText(String JavaDoc text) {
25         myExpectedText.setExpected(text);
26     }
27 }
Popular Tags