Conversation
|
Adding some context: I only found about this attribute in this stack-overflow answer. |
|
|
||
| mapper.readValue(data, FilePropertiesSpec.class); | ||
| // pass | ||
| FilePropertiesSpec parsed = mapper.readValue(data, FilePropertiesSpec.class); |
There was a problem hiding this comment.
I’m more familiar with these types of questions on values rather than the “Test.None.class” approach.
| } | ||
|
|
||
| @Test | ||
| @Test(expected = Test.None.class /* no exception expected */) |
There was a problem hiding this comment.
This is an interesting discovery and approach! But maybe let's stick with directly calling assert statements to follow the guidelines on having dedicated arrange, act and assert blocks in tests?
There was a problem hiding this comment.
make sense. Let me do the changes and stick to assert statements for these.
...mon/src/test/java/com/google/cloud/tools/jib/plugins/common/SkaffoldSyncMapTemplateTest.java
Outdated
Show resolved
Hide resolved
| SkaffoldSyncMapTemplate templateNoGenerated = | ||
| SkaffoldSyncMapTemplate.from(TEST_JSON_NO_GENERATED); | ||
| Assert.assertTrue(templateNoGenerated.getGenerated().isEmpty()); | ||
| // pass if no exceptions |
There was a problem hiding this comment.
We can remove this comment now
|
LGTM, just a few minor comments. |
Co-authored-by: Mridula <66699525+mpeddada1@users.noreply.github.com>
|
Kudos, SonarCloud Quality Gate passed!
|








fixes sonar code-smell for "Add at least one assertion to this test case."
List of sonar links related:
Used expect attribute of the @test annotation for tests that success with no exceptions. This should be enough to silent sonar.