BackquoteIntegrityChecker extends RegexIntegrityChecker { @Override public void check(String sourceContent, String targetContent) throws BackquoteIntegrityCheckerException { try { super.check(sourceContent, targetContent); } catch (RegexCheckerException rce) { throw new BackquoteIntegrityCheckerException((rce.getMessage())); } }  @Override String getRegex(); @Override void check(String sourceContent, String targetContent);  }
@Test public void testBackquoteCheckWorks() { String source = "Check `shared_item` and `collaborators`."; String target = "Vink `shared_item` en `collaborators` aan."; checker.check(source, target); }
@Test public void testBackquoteWorksWithDifferentOrders() { String source = "Check `shared_item` and `collaborators`."; String target = "Vink `collaborators` en `shared_item` aan."; checker.check(source, target); }
@Test(expected = BackquoteIntegrityCheckerException.class) public void testBackquoteCheckWorksWhenMissingAClosingQuote() { String source = "Check `shared_item` and `collaborators`."; String target = "Vink `collaborators` en `shared_item aan."; checker.check(source, target); }
@Test(expected = BackquoteIntegrityCheckerException.class) public void testBackquoteCheckWorksWhenMissingQuotes() { String source = "Check `shared_item` and `collaborators`."; String target = "Vink shared_item en collaborators aan."; checker.check(source, target); }
@Test(expected = BackquoteIntegrityCheckerException.class) public void testBackquoteCheckWorksWhenTagIsModified() { String source = "Check `shared_item` and `collaborators`."; String target = "Vink `medewerkers` en `shared_item` aan."; checker.check(source, target); }
@Test(expected = BackquoteIntegrityCheckerException.class) public void testBackquoteCheckWorksWhenCountDoesNotMatch() { String source = "Check `shared_item` and `collaborators`."; String target = "Check `shared_item`, `permissions` and `collaborators`."; checker.check(source, target); }