Code example for PrintStream

Methods: println

0
 
        FactoryMethod anotherMethod = new FactoryMethod("SomeClass", "anotherMethod", "unusedReturnType");
        anotherMethod.setGenerifiedType("int");
        writer.writeMethod("anotherMethod", anotherMethod);
 
        expected.println("        [String] namedMethod(Cheese a, int b)");
        expected.println("           [int] anotherMethod()");
        verify(); 
    } 
 
    @Test public void 
    removesPackageNames() throws IOException { 
        FactoryMethod namedMethod = new FactoryMethod("SomeClass", "someMethod", "unusedReturnType");
        namedMethod.addParameter("com.blah.Foo", "a");
        namedMethod.addParameter("com.foo.Cheese<x.y.Zoo>", "b");
        namedMethod.setGenerifiedType("java.lang.Cheese");
        writer.writeMethod("namedMethod", namedMethod);
 
        expected.println("        [Cheese] namedMethod(Foo a, Cheese<Zoo> b)");
        verify(); 
    }