Skip to content

Conversation

@yuri-sergiichuk
Copy link
Contributor

@yuri-sergiichuk yuri-sergiichuk commented Dec 7, 2020

This PR improves our Gradle dependencies management a bit and applies the new scope to the dependencies that are used by the code analysis software only.

As part of the PR, I have also eliminated the usage of the hamcrest assertion framework in favor of truth.

The change is related to the SpineEventEngine/config#156 issue.

@yuri-sergiichuk yuri-sergiichuk self-assigned this Dec 7, 2020
@yuri-sergiichuk yuri-sergiichuk marked this pull request as ready for review December 7, 2020 10:11
@yuri-sergiichuk yuri-sergiichuk requested a review from a team December 7, 2020 10:11
Copy link
Contributor

@dmdashenkov dmdashenkov left a comment

Choose a reason for hiding this comment

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

@yuri-sergiichuk, LGTM with a few minor comments.

NewBoundedContextBuilderTest.class.getName());
assertFalse(builder.tenantIndex()
.isPresent());
assertThat(builder.tenantIndex()).isEmpty();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
assertThat(builder.tenantIndex()).isEmpty();
assertThat(builder.tenantIndex())
.isEmpty();

assertTrue(updatedIndex.isPresent());
assertThat(updatedIndex.get(), instanceOf(TestNamespaceIndex.getType()));
assertThat(updatedIndex).isPresent();
Truth.assertThat(updatedIndex.get())
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use a static import. Java can handle multiple imported methods with the same name if parameters are different.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's interesting is that IDEA does not allow fixing if not doing the static import manually.

.tenantIndex();
assertTrue(updatedIndex.isPresent());
assertThat(updatedIndex.get(), instanceOf(TestNamespaceIndex.getType()));
assertThat(updatedIndex).isPresent();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please apply the formatting as in the suggestion above — the assertion on a new line. It's our conversion. It makes assertions easier to read.

assertNotNull(namespace);
assertEquals(namespaceValue, namespace.value());
assertThat(namespace).isNotNull();
assertThat(namespace.value()).isEqualTo(namespaceValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same in this file.

@yuri-sergiichuk yuri-sergiichuk merged commit 2569f04 into master Dec 7, 2020
@yuri-sergiichuk yuri-sergiichuk deleted the improve-deps-management branch December 7, 2020 10:52
@yuri-sergiichuk yuri-sergiichuk mentioned this pull request Dec 15, 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