Skip to content

Commit

Permalink
Bump junit in diktat-maven-plugin from 3.8.2 to 4.13.1 (#590)
Browse files Browse the repository at this point in the history
* Bump junit in diktat-maven-plugin from 3.8.2 to 4.13.1

Bumps [junit](https://github.com/junit-team/junit4) from 3.8.2 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.1.md)
- [Commits](junit-team/junit4@r3.8.2...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Trifanov <peter.trifanov@mail.ru>
  • Loading branch information
dependabot[bot] and petertrr authored Nov 30, 2020
1 parent 047ad05 commit 9224019
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion diktat-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
package org.cqfn.diktat.plugin.maven

import junit.framework.Assert
import org.apache.maven.plugin.testing.AbstractMojoTestCase
import org.apache.maven.plugin.testing.MojoRule
import org.junit.Assert
import org.junit.Rule
import org.junit.Test
import kotlin.io.path.ExperimentalPathApi
import kotlin.io.path.createTempFile
import kotlin.io.path.writeText

/**
* Tests for mojo configuration
* FixMe: inject project version from outside
* FixMe: `@Parameter` properties are not set
*
* FixMe: `@Parameter` properties are not initialized with default values
*/
@OptIn(ExperimentalPathApi::class)
class DiktatBaseMojoTest : AbstractMojoTestCase() {
class DiktatBaseMojoTest {
@get:Rule
val mojoRule = MojoRule()

@Test
fun `test plugin configuration`() {
val pom = createTempFile()
pom.writeText(
Expand All @@ -31,7 +37,6 @@ class DiktatBaseMojoTest : AbstractMojoTestCase() {
<plugin>
<groupId>org.cqfn.diktat</groupId>
<artifactId>diktat-maven-plugin</artifactId>
<version>0.1.6-SNAPSHOT</version>
<configuration>
<diktatConfigFile>diktat-analysis.yml</diktatConfigFile>
</configuration>
Expand All @@ -48,7 +53,7 @@ class DiktatBaseMojoTest : AbstractMojoTestCase() {
</project>
""".trimIndent()
)
val diktatCheckMojo = lookupMojo("check", pom.toFile()) as DiktatCheckMojo
val diktatCheckMojo = mojoRule.lookupMojo("check", pom.toFile()) as DiktatCheckMojo
Assert.assertEquals(false, diktatCheckMojo.debug)
Assert.assertEquals("diktat-analysis.yml", diktatCheckMojo.diktatConfigFile)
}
Expand Down

0 comments on commit 9224019

Please sign in to comment.