question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Projection testing

See original GitHub issue

Axon provides fixtures when it comes to Saga and Aggregate testing. When it comes to projection testing developers are left on their own. It might be useful to provide a functionality in axon-test module for testing projections.

Here is a proposal:

ProjectionFixture fixture = ProjectionFixture.registerHandlingComponent(new MyProjection()) // here we can have scanning of @EventHandlers and @QueryHandlers
                                             .registerResource(new MyRepository()); // or mock

fixture.given(events)
       .whenQuery(query) // whenScatterGatherQuery, whenSubscriptionQuery
       .expectResult(queryResult);

...

fixture.given(events)
       .andSubscriptionQuery(query) 
       .when(event)
       .expectEmittedUpdate(anUpdate);

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:27
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
Blackdreadcommented, Aug 16, 2019

big +1 I was looking to test queries but not possible

2reactions
hsdmirandacommented, Sep 19, 2019

Yes, it is a bit frustrating to try to use the @QueryHandler/QueryGatway without testing support from the framework

Read more comments on GitHub >

github_iconTop Results From Across the Web

Projective test | Definition, Types, Examples, & Facts | Britannica
projective test, in psychology, examination that commonly employs ambiguous stimuli, notably inkblots (Rorschach Test) and enigmatic pictures (Thematic ...
Read more >
Projective test - Wikipedia
In psychology, a projective test is a personality test designed to let a person respond to ambiguous stimuli, presumably revealing hidden emotions and ......
Read more >
Projective Tests - Online Projective Personality Tests for Free
Free Projective Tests Online ⭐ Enjoy the best projective tests that worth taking ⭐ Get instant results without registration for free ☝ Here!...
Read more >
Projective Tests - Simply Psychology
A projective test is one in which a test taker responds to or provides ambiguous, abstract, or unstructured stimuli, often in the form...
Read more >
How Projective Tests Are Used to Measure Personality
A projective test is a type of personality test in which you offer responses to ambiguous scenes, words, or images.1 The goal of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found