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
BlackBoxBoundedContext improvements #1146
Conversation
…java into bbbc-improvements # Conflicts: # license-report.md
# Conflicts: # license-report.md
@armiol, PTAL. |
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.
@dmdashenkov please see my comments.
AggUserNotified.class)) | ||
.close(); | ||
EventSubject assertEvents = context.receivesCommand(reassignTask()) | ||
.assertEvents(); |
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.
Looks the alignment is broken here.
} | ||
} | ||
} | ||
|
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.
This line looks redundant to me.
|
||
MESSAGE_COUNT("the count of the generated messages is"), | ||
REQUESTED_INDEX("but the requested index was"), | ||
@SuppressWarnings("DuplicateStringLiteralInspection") |
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.
Please comment on this. Just for consistency.
if (index >= size) { | ||
public final ProtoSubject message(int index) { | ||
if (messages() == null) { | ||
failWithActual(fact(FactKey.ACTUAL.value, null)); |
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.
Can we use the enum values without referencing the enum name?
T outerObject = Iterables.get(messages(), index); | ||
Message unpacked = AnyPacker.unpack(outerObject.getMessage()); | ||
return ProtoTruth.assertThat(unpacked); | ||
|
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.
Please kill this line.
* | ||
* @return an immutable copy of the {@code actual} messages | ||
*/ | ||
public List<T> actual() { |
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.
I am not sure, but we tend to use the returning values of such methods as plain List
s and then eventually wrap them into ImmutableList
s over and over again.
So if we can declare the ImmutableList
as a type of the returning value, I would do so.
Codecov Report
@@ Coverage Diff @@
## master #1146 +/- ##
=========================================
Coverage ? 91.72%
Complexity ? 4094
=========================================
Files ? 536
Lines ? 12968
Branches ? 748
=========================================
Hits ? 11895
Misses ? 839
Partials ? 234 |
@armiol, PTAL again. |
@dmdashenkov @dmitrykuzmin please settle down on the conflicts. We need |
# Conflicts: # license-report.md
In this PR we provide a number of enhancements for the
BlackBoxBoundedContext
API:Subject
s now expose theactual()
method in order to allow users to build more complex verifications, for example, to test metadata of dispatched signals.