Skip to content

Commit

Permalink
Issue #5870
Browse files Browse the repository at this point in the history
Add a test for Resource.equals

Signed-off-by: Jan Bartel <janb@webtide.com>
  • Loading branch information
janbartel committed Jan 11, 2021
1 parent daa0c94 commit 799691c
Showing 1 changed file with 15 additions and 0 deletions.
Expand Up @@ -34,6 +34,7 @@
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
Expand All @@ -43,6 +44,7 @@
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class ResourceTest
{
Expand Down Expand Up @@ -297,4 +299,17 @@ public void testGlobPath() throws IOException
Resource globResource = Resource.newResource(globReference);
assertNotNull(globResource, "Should have produced a Resource");
}

@Test
@EnabledOnOs({OS.MAC, OS.WINDOWS})
public void testEquals() throws Exception
{
URI a = new URI("file:///c:/foo/bar");
URI b = new URI("file:///C:/foo/bar");

Resource ra = Resource.newResource(a);
Resource rb = Resource.newResource(b);

assertTrue(ra.equals(rb));
}
}

0 comments on commit 799691c

Please sign in to comment.