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

Improvements for testing utilities (part 2) #1251

Merged
merged 21 commits into from
Mar 18, 2020

Conversation

alexander-yevsyukov
Copy link
Contributor

@alexander-yevsyukov alexander-yevsyukov commented Mar 17, 2020

This PR continues improvements started in #1249. This PR:

  • Deprecates redundant factory methods of BlackBoxBoundedContext leaving only from(BoundedContextBuilder) as the preferred method of creating BlackBoxBoundedContext instances.
  • The factory method now return BlackBoxBoundedContext<?> instead of specific types.
    Test should not really depend on whether the context is single- or multi-tenant.
  • withXxx() methods that added repositories or message handling objects to existing context were also deprecated. A context for being tested must come pre-configured in the builder passed to from(BoundedContextBuilder) method.
  • BlackBoxBoundedContext no longer extends AbstractEventSubscriber. This eliminates confusion with the methods of AbstractEventSubscriber available in the code of tests.

@alexander-yevsyukov alexander-yevsyukov self-assigned this Mar 17, 2020
@codecov
Copy link

codecov bot commented Mar 17, 2020

Codecov Report

Merging #1251 into master will decrease coverage by 0.08%.
The diff coverage is 80%.

@@             Coverage Diff              @@
##             master    #1251      +/-   ##
============================================
- Coverage     91.09%   91.01%   -0.09%     
+ Complexity     4665     4659       -6     
============================================
  Files           596      596              
  Lines         14703    14710       +7     
  Branches        831      831              
============================================
- Hits          13394    13388       -6     
- Misses         1049     1060      +11     
- Partials        260      262       +2

@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review March 17, 2020 17:12
@alexander-yevsyukov alexander-yevsyukov merged commit 8259406 into master Mar 18, 2020
@alexander-yevsyukov alexander-yevsyukov deleted the testing-utils-p2 branch March 18, 2020 15:16
@dmitrykuzmin dmitrykuzmin mentioned this pull request Sep 8, 2020
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.

2 participants