01: package com.jeantessier.dependency;
02:
03: import java.io.*;
04:
05: import junit.framework.*;
06:
07: public class TestNodeNamePrinter extends TestCase {
08: public void testPrintPackageName() {
09: StringWriter buffer = new StringWriter();
10: PrintWriter out = new PrintWriter(buffer);
11: Visitor visitor = new NodeNamePrinter(out);
12:
13: visitor.visitPackageNode(new PackageNode("foobar", true));
14:
15: assertEquals("package foobar", buffer.toString());
16: }
17: }
|