alexruiz / fest-assert-2.x

FEST Fluent Assertions 2.x
http://fest.easytesting.org
Apache License 2.0
402 stars 69 forks source link

Provide Eclipse and Idea template to ease writing custom assertions classes #144

Open joel-costigliola opened 11 years ago

pbetkier commented 11 years ago

Here's a simple Custom FEST Assertion template that I use in IntelliJ:

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

import org.fest.assertions.api.AbstractAssert;

#parse("File Header.java")
public class ${NAME} extends AbstractAssert<${NAME}, ${Class_being_asserted}> {

    private ${NAME}(${Class_being_asserted} actual) {
        super(actual, ${NAME}.class);
    }

    public static ${NAME} assertThat(${Class_being_asserted} actual) {
        return new ${NAME}(actual);
    }
}

I can prepare a similar template for Eclipse if that's the template that you expected.

joel-costigliola commented 11 years ago

Nice ! I am interested but for ... AssertJ a fork of fest-assert-2.x (forked because fest is frozen and to have an assertion library more community friendly).

Can you provide an Eclipse template too ?

Thanks

pbetkier commented 11 years ago

Providing an Eclipse template (custom new class wizard) requires writing a plug-in, right? I will dive into this soon. I will create an issue in AssertJ as well once it's ready.