From 466210447d78d11fd025428667e0eeb7a6fd28c0 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Mon, 22 May 2023 15:26:46 +0200 Subject: [PATCH] Update DetectIndentTest --- maven-plugin/pom.xml | 6 ++++++ .../tools/incrementals/maven/DetectIndentTest.java | 13 +++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 987c75a..1978e18 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -87,6 +87,12 @@ + + org.junit.jupiter + junit-jupiter-params + 5.9.3 + test + diff --git a/maven-plugin/src/test/java/io/jenkins/tools/incrementals/maven/DetectIndentTest.java b/maven-plugin/src/test/java/io/jenkins/tools/incrementals/maven/DetectIndentTest.java index fd55f3c..cd2b6c3 100644 --- a/maven-plugin/src/test/java/io/jenkins/tools/incrementals/maven/DetectIndentTest.java +++ b/maven-plugin/src/test/java/io/jenkins/tools/incrementals/maven/DetectIndentTest.java @@ -1,17 +1,14 @@ package io.jenkins.tools.incrementals.maven; +import org.junit.jupiter.api.Test; + import java.util.Arrays; import java.util.Collection; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import static org.junit.jupiter.api.Assertions.assertEquals; -@RunWith(Parameterized.class) public class DetectIndentTest { - @Parameterized.Parameters public static Collection data() { return Arrays.asList(new Object[][] { { "abc", 0, ' ' }, { " abc", 2, ' ' }, { " abc", 4, ' ' }, { "\t\tabc", 2, '\t' }, { "\tabc", 1, '\t' } @@ -34,7 +31,7 @@ public DetectIndentTest(String input, int size, char type) { public void detectIndentSize() { DetectIndent detectIndent = new DetectIndent(); DetectIndent.Indent indent = detectIndent.detect(input); - Assert.assertEquals(size, indent.size); - Assert.assertEquals(type, indent.type); + assertEquals(size, indent.size); + assertEquals(type, indent.type); } }