-
Notifications
You must be signed in to change notification settings - Fork 12
Improvements for testing utilities (part 1) #1249
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
Conversation
We're not running it through normal deprecation cycle since these testing utilities are not used already. It's more practical to remove it sooner in favor of new Subject-based testing utilities.
This eliminates `GivenLifecycleFlags` class as a utility. There is newer API, which exposes `archivedFlag()` and `deletedFlag()` as `BooleanSubject`.
Codecov Report
@@ Coverage Diff @@
## master #1249 +/- ##
===========================================
+ Coverage 90.99% 91.09% +0.1%
+ Complexity 4828 4665 -163
===========================================
Files 631 596 -35
Lines 15129 14703 -426
Branches 846 831 -15
===========================================
- Hits 13766 13394 -372
+ Misses 1101 1049 -52
+ Partials 262 260 -2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-yevsyukov LGTM in general. Please see my comments and suggestions.
testutil-server/src/main/java/io/spine/testing/server/blackbox/BlackBoxBoundedContext.java
Outdated
Show resolved
Hide resolved
testutil-server/src/main/java/io/spine/testing/server/blackbox/ContextAwareTest.java
Outdated
Show resolved
Hide resolved
testutil-server/src/main/java/io/spine/testing/server/blackbox/ContextAwareTest.java
Outdated
Show resolved
Hide resolved
testutil-server/src/main/java/io/spine/testing/server/blackbox/SubscriptionFixture.java
Outdated
Show resolved
Hide resolved
testutil-server/src/main/java/io/spine/testing/server/blackbox/SubscriptionFixture.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-yevsyukov LGTM.
Changes introduced by this PR:
Verify
-based API is removed. This includes bothclient
andserver
packages.Remaining bits related to
VerifyAcknowledgements
is going to be removed in the following PR.ContextAwareTest
abstract test suite base is introduced.Improvements in
BlackBoxBoundedContext
:EventStore
so the user can arrange a test environment this way.eventBus()
andcommandBus()
.subscribe(Topic)
now returnsSubscriptionFixture
which can assert both entity states and event messages viaIterableOfProtosSubject
.Changes to
BlackBoxBoundedContext
and removal of old Verify-based API are breaking. It's more or less safe to do since the number of users are small, and efforts for arranging full deprecating cycle will not pay off.