Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug/MET 5369 isShownBy isShownAt disappearing #621

Merged
merged 2 commits into from
Sep 1, 2023

Conversation

stzanakis
Copy link
Member

No description provided.

Copy link
Contributor

@jeortizquan jeortizquan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It processes the normalization resource with white spaces. just a suggestions for code.

Include in unit test CleanIRIViolationsNormalizerTest

private static final String WHITESPACE_TRIM_VIOLATION = " http://example.com/query?q=random word";

@Test
  void whitespaceViolationTrimTest() {
    List<NormalizedValueWithConfidence> result = normalizer.normalizeValue(WHITESPACE_TRIM_VIOLATION);
    Iterator<Violation> violations = normalizer.getViolations();
    assertTrue(StreamSupport
            .stream(Spliterators.spliteratorUnknownSize(violations, Spliterator.SIZED), false)
            .anyMatch(violation -> violation.codeName().equals("WHITESPACE")));
    assertEquals("http://example.com/query?q=random%20word", result.get(0).getNormalizedValue());
    assertEquals(1, result.get(0).getConfidence());
  }

@stzanakis stzanakis changed the title MET-5369: Trim IRI before validation bug/MET 5369 isShownBy isShownAt disappearing Sep 1, 2023
@jeortizquan jeortizquan merged commit 56ddc13 into develop Sep 1, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants