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

CDITCK-551 add test for ProcessSynthethicObserverMethod. #126

Closed
wants to merge 1 commit into from

Conversation

manovotn
Copy link
Contributor

Note that the build here will fail as ProcessSyntheticObserverMethod was added after CDI Alpha6 release.

public void syntheticEventInvokedAndReturningSourceTest() {
assertTrue(extension.timesInvoked() == 3);
Map<Type, Extension> map = extension.getSources();
assertTrue(map.get(Peach.class) instanceof ProcessSyntheticObserverMethodObserver);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use assertEquals comparing Class of given extension.

@SpecAssertions({@SpecAssertion(section = PROCESS_OBSERVER_METHOD, id = "aab"),
@SpecAssertion(section = PROCESS_OBSERVER_METHOD, id = "dae")})
public void syntheticEventInvokedAndReturningSourceTest() {
assertTrue(extension.timesInvoked() == 3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use assertEquals as well please. It's more informative when the test fails

@tremes
Copy link
Contributor

tremes commented Dec 15, 2016

Otherwise it's good.

@manovotn
Copy link
Contributor Author

Rebased onto master and incorporated requested changes.

@tremes
Copy link
Contributor

tremes commented Dec 16, 2016

Merged. Thank you.

@tremes tremes closed this Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants