Skip to content

Commit

Permalink
Merge pull request #242 from jenkinsci/dependabot/maven/org.jvnet.hud…
Browse files Browse the repository at this point in the history
…son.plugins-analysis-pom-7.0.0

Bump org.jvnet.hudson.plugins:analysis-pom from 6.17.0 to 7.0.0
  • Loading branch information
uhafner authored Jan 26, 2024
2 parents f59cbd3 + 6b08ccf commit 9c60fa9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>6.17.0</version>
<version>7.0.0</version>
<relativePath />
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
package io.jenkins.plugins.fontawesome;

import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
import org.junit.jupiter.params.provider.NullSource;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand All @@ -17,15 +10,23 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static org.assertj.core.api.Assertions.assertThat;
import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
import org.junit.jupiter.params.provider.NullSource;

import edu.umd.cs.findbugs.annotations.CheckForNull;

import static org.assertj.core.api.Assertions.*;

/**
* Test Class for {@link FontAwesomeIcons}.
*
* @author strangelookingnerd
*/
class FontAwesomeIconsTest {

@BeforeAll
static void init() {
assertThat(
Expand All @@ -42,14 +43,13 @@ void testGetIconClassName() {
@ParameterizedTest
@NullSource
@EnumSource(SvgTag.FontAwesomeStyle.class)
void testGetAvailableIconsFiltered(final SvgTag.FontAwesomeStyle style) throws Exception {
void testGetAvailableIconsFiltered(@CheckForNull final SvgTag.FontAwesomeStyle style) throws Exception {
Map<String, String> availableIcons = style == null ? FontAwesomeIcons.getAvailableIcons() : FontAwesomeIcons.getAvailableIcons(style);

assertThat(availableIcons).isNotNull().isNotEmpty();

try (Stream<Path> stream = Files
.walk(Paths.get("./target/classes/images/symbols/" + (style == null ? "" : style.name().toLowerCase(Locale.ENGLISH))), 2)) {

Set<String> iconNames = stream
.filter(path -> StringUtils.endsWith(path.getFileName().toString(), ".svg"))
.map(path -> path.getParent().getFileName().toString() + "/" + StringUtils.removeEnd(path.getFileName().toString(), ".svg"))
Expand All @@ -62,5 +62,4 @@ void testGetAvailableIconsFiltered(final SvgTag.FontAwesomeStyle style) throws E
}
}
}

}

0 comments on commit 9c60fa9

Please sign in to comment.