Skip to content

Commit

Permalink
Update DetectIndentTest
Browse files Browse the repository at this point in the history
  • Loading branch information
NotMyFault committed May 22, 2023
1 parent 90fd5ed commit 4662104
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 6 additions & 0 deletions maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.9.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
@@ -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<Object[]> data() {
return Arrays.asList(new Object[][] {
{ "abc", 0, ' ' }, { " abc", 2, ' ' }, { " abc", 4, ' ' }, { "\t\tabc", 2, '\t' }, { "\tabc", 1, '\t' }
Expand All @@ -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);
}
}

0 comments on commit 4662104

Please sign in to comment.