Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joel-costigliola opened this issue Feb 4, 2013 · 3 comments

Comments

@joel-costigliola
Copy link
Contributor

No description provided.

@pbetkier
Copy link

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
Copy link
Contributor Author

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants