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

Created tests for diktat-gradle-plugin #561

Merged
merged 6 commits into from
Nov 23, 2020

Conversation

petertrr
Copy link
Member

What's done:

  • Added tests
  • Added jacoco config

This pull request closes #542

### What's done:
* Added tests
* Added jacoco config
@codecov
Copy link

codecov bot commented Nov 20, 2020

Codecov Report

Merging #561 (6c3de5c) into master (052bd9d) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #561   +/-   ##
=========================================
  Coverage     81.68%   81.68%           
- Complexity     1641     1652   +11     
=========================================
  Files            79       83    +4     
  Lines          4139     4205   +66     
  Branches       1307     1312    +5     
=========================================
+ Hits           3381     3435   +54     
- Misses          229      238    +9     
- Partials        529      532    +3     
Flag Coverage Δ Complexity Δ
unittests 81.68% <ø> (+<0.01%) 0.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...n/org/cqfn/diktat/plugin/gradle/DiktatExtension.kt 100.00% <0.00%> (ø) 4.00% <0.00%> (?%)
...qfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt 79.31% <0.00%> (ø) 5.00% <0.00%> (?%)
...rg/cqfn/diktat/plugin/gradle/DiktatGradlePlugin.kt 100.00% <0.00%> (ø) 2.00% <0.00%> (?%)
...main/kotlin/org/cqfn/diktat/plugin/gradle/Utils.kt 62.50% <0.00%> (ø) 0.00% <0.00%> (?%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 052bd9d...6c3de5c. Read the comment docs.

### What's done:
* Added tests
* Added jacoco config
### What's done:
* Added tests
@petertrr petertrr marked this pull request as ready for review November 20, 2020 13:05
@petertrr petertrr requested a review from orchestr7 November 20, 2020 13:05
### What's done:
* Added tests
@Test
fun `test gradle version`() {
Assertions.assertEquals(
GradleVersion.fromString("6.6.1"),
Copy link
Member

Choose a reason for hiding this comment

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

why do you need to test gradle version. It can be changed in any moment. No?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm testing my GradleVersion class, which is used to determine which type of task is supported by current gradle.

<executable>${gradle.executable}</executable>
<arguments>
<argument>clean</argument>
<argument>jacocoTestReport</argument>
Copy link
Member

Choose a reason for hiding this comment

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

why do you need test report here? For test coverage?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this tasks will execute test and then generate jacoco report.

Copy link
Member

@orchestr7 orchestr7 left a comment

Choose a reason for hiding this comment

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

lgtm

@petertrr petertrr merged commit 4d17fe0 into master Nov 23, 2020
@petertrr petertrr deleted the feature/gradle-plugin-tests#542 branch November 23, 2020 08:43
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.

Write tests for gradle plugin
2 participants