KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thoughtworks > xstream > testutil > CallLog


1 package com.thoughtworks.xstream.testutil;
2
3 import junit.framework.Assert;
4
5 public class CallLog {
6
7     private StringBuffer JavaDoc expected = new StringBuffer JavaDoc();
8     private StringBuffer JavaDoc actual = new StringBuffer JavaDoc();
9
10     public void expect(String JavaDoc message) {
11         expected.append(message).append('\n');
12     }
13
14     public void actual(String JavaDoc message) {
15         actual.append(message).append('\n');
16     }
17
18     public void verify() {
19         Assert.assertEquals(expected.toString(), actual.toString());
20         reset();
21     }
22
23     public void reset() {
24         expected = new StringBuffer JavaDoc();
25         actual = new StringBuffer JavaDoc();
26     }
27
28 }
29
Popular Tags