01: /*
02: * Copyright (C) 2005 Joe Walnes.
03: * Copyright (C) 2006, 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 02. February 2005 by Joe Walnes
11: */
12: package com.thoughtworks.xstream.testutil;
13:
14: import junit.framework.Assert;
15:
16: public class CallLog {
17:
18: private StringBuffer expected = new StringBuffer();
19: private StringBuffer actual = new StringBuffer();
20:
21: public void expect(String message) {
22: expected.append(message).append('\n');
23: }
24:
25: public void actual(String message) {
26: actual.append(message).append('\n');
27: }
28:
29: public void verify() {
30: Assert.assertEquals(expected.toString(), actual.toString());
31: reset();
32: }
33:
34: public void reset() {
35: expected = new StringBuffer();
36: actual = new StringBuffer();
37: }
38:
39: }
|