Mistake in Fixture API, exposing internal FixtureType?

0 views
Skip to first unread message

Jakub Holý

unread,
May 6, 2019, 6:31:19 AM5/6/19
to concordion-dev
Hi,

Why implementing my clojure.test integration, I had to implement the Fixture interface and realized that it has
FixtureType getFixtureType();
returning a concrete, org.concordion.internal class. I believe this could easily be replaced with the interface that class implements, i.e.

FixtureDeclarations getFixtureDeclarations();
It would make more sense if an interface method returned an instance of an interface rather than a concrete, internal class. Now it is not enough for me to simply implement these two interfaces, I am also forced to extend and override all of FixtureType methods (delegating all the calls to my custom FixtureDeclarations implementation).

Thoughts?

Cheers, Jakub

Jakub Holý

unread,
May 6, 2019, 7:31:18 AM5/6/19
to concordion-dev
Related:

FixtureDeclarations.declaresResources()
is kind if useless on its own. It requires that org.concordion.internal.ResourceFinder#getResourcesToCopy goes through the class hierarchy and checks its annotations (which makes is unusable for me, as I can generate classes but no annotated classes from Clojure). It would be much better if it worked similarly to
FixtureDeclarations.getDeclaredConcordionOptionsParentFirst() => List<ConcordionOptions>
i.e. if it was something like this instead:
FixtureDeclarations.getDeclaredResourcesParentFirst() => List<ConcordionResources>
Thoughts?
Cheers, Jakub

Nigel Charman

unread,
May 6, 2019, 2:53:50 PM5/6/19
to concord...@googlegroups.com
Yep, that makes sense. We obviously didn't take the refactoring far enough when we did it!

Would you make a PR with the proposed changes in. I think these would be Minor changes under our Version Numbering guidelines. We're getting closer to a new Major version too!

Nigel
--
You received this message because you are subscribed to the Google Groups "concordion-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concordion-de...@googlegroups.com.
To post to this group, send email to concord...@googlegroups.com.
Visit this group at https://groups.google.com/group/concordion-dev.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion-dev/CA%2BffqM0S5FvBAHhXuBwwBZ3FDrtDkEkq2eJFVD%3DQF%3Da-kkvt_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Nigel Charman

unread,
May 6, 2019, 3:03:49 PM5/6/19
to concord...@googlegroups.com
That makes sense too. I am planning to update this code for Concordion 3.0.0 to allow resources to be found in Jar files, probably using the fast-classpath-scanner library.

Just checking you're good with
FixtureDeclarations.declaresFailFast()
and
FixtureDeclarations.declaresFullOGNL()
since these are effectively standalone methods?

Nigel
--
You received this message because you are subscribed to the Google Groups "concordion-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concordion-de...@googlegroups.com.
To post to this group, send email to concord...@googlegroups.com.
Visit this group at https://groups.google.com/group/concordion-dev.
Reply all
Reply to author
Forward
0 new messages