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 text) { 13 myExpectedText.setActual(text); 14 } 15 16 public String getText() { 17 return (String )myText.getValue(); 18 } 19 20 public void setupGetText(String text) { 21 myText.setValue(text); 22 } 23 24 public void setExpectedText(String text) { 25 myExpectedText.setExpected(text); 26 } 27 } | Popular Tags |