Package com.pogofish.jadt.sink

Examples of com.pogofish.jadt.sink.StringSink.result()


            emitter.constructorFactory(sink, "SomeDataType", Util.<String>list(), constructor);
        } finally {
            sink.close();
        }
        assertEquals(FACTORY, sink.result());
    }
   
    /**
     * Create a constructor class
     */
 
View Full Code Here


            emitter.constructorDeclaration(sink, constructor, "NonPrimitive", Util.<String>list());
        } finally {
            sink.close();
        }
        assertEquals(CONSTRUCTOR_CLASS, sink.result());
    }
}
View Full Code Here

        try {
            emitter.emitParameterizedTypeName(sink, Util.<String>list());
        } finally {
            sink.close();           
        }
        assertEquals("", sink.result());
    }
   
    /**
     * Make sure parameterized type names with one type parameter are handled properly
     */
 
View Full Code Here

        try {
            emitter.emitParameterizedTypeName(sink, list("A"));
        } finally {
            sink.close();           
        }
        assertEquals("<A>", sink.result());
 
  }
   
    /**
     * Make sure parameterized type names with multiple type parameters are handled properly
View Full Code Here

        try {
            emitter.emitParameterizedTypeName(sink, list("A", "B", "C"));
        } finally {
            sink.close();           
        }
        assertEquals("<A, B, C>", sink.result());
 
  }
   
    /**
     * If a factory has no args and no type parameters it should be a simple constant
View Full Code Here

        try {
            emitter.constructorFactory(sink, "SomeDataType", "SomeFactory", Util.<String>list(), constructor);
        } finally {
            sink.close();           
        }
        assertEquals(NO_ARG_NO_TYPES_FACTORY, sink.result());
    }

    /**
     * If a factory has no args but does have type parameters it should be a constant with some warning suppression
     */
 
View Full Code Here

        try {
            emitter.constructorFactory(sink, "SomeDataType", "SomeFactory", list("A", "B"), constructor);
        } finally {
            sink.close();           
        }
        assertEquals(NO_ARG_TYPES_FACTORY, sink.result());
    }

    /**
     * If a factory has args but not types then it must be a simple method
     */
 
View Full Code Here

           
            emitter.constructorFactory(sink, "SomeDataType", "SomeFactory", Util.<String>list(), constructor);
        } finally {
            sink.close();           
        }
        assertEquals(ARGS_NO_TYPES_FACTORY, sink.result());
    }

    /**
     * If a factory has args and types then it must be a slightly more complicated method
     */
 
View Full Code Here

           
            emitter.constructorFactory(sink, "SomeDataType", "SomeFactory", list("A", "B"), constructor);
        } finally {
            sink.close();           
        }
        assertEquals(ARGS_TYPES_FACTORY, sink.result());
    }   
    /**
     * How does the Java class constructor look?
     */
    @Test
View Full Code Here

        try {
            emitter.emitConstructorMethod(sink, "    ", constructor);
        } finally {
            sink.close();
        }
        assertEquals(CONSTRUCTOR_METHOD, sink.result());
    }
       
    /**
     * toString with no args
     */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.