Search in sources :

Example 1 with LanguageToolMarker

use of org.omegat.languagetools.LanguageToolWrapper.LanguageToolMarker in project omegat by omegat-org.

the class FalseFriendsTest method testRemoveRules.

@Test
public void testRemoveRules() throws Exception {
    LanguageToolMarker marker = new LanguageToolMarker() {

        public boolean isEnabled() {
            return true;
        }
    };
    List<Mark> marks = marker.getMarksForEntry(null, "This is some long text without translation.", "", true);
    assertEquals(0, marks.size());
    marks = marker.getMarksForEntry(null, "This is text with the same translation.", "This is text with the same translation.", true);
    assertEquals(0, marks.size());
}
Also used : LanguageToolMarker(org.omegat.languagetools.LanguageToolWrapper.LanguageToolMarker) Mark(org.omegat.gui.editor.mark.Mark) Test(org.junit.Test)

Example 2 with LanguageToolMarker

use of org.omegat.languagetools.LanguageToolWrapper.LanguageToolMarker in project omegat by omegat-org.

the class FalseFriendsTest method testExecute.

@Test
public void testExecute() throws Exception {
    LanguageToolMarker marker = new LanguageToolMarker() {

        public boolean isEnabled() {
            return true;
        }
    };
    List<Mark> marks = marker.getMarksForEntry(null, "This is abnegation.", "To jest abnegacja.", true);
    assertEquals(1, marks.size());
    assertTrue(marks.get(0).toolTipText.contains("slovenliness"));
}
Also used : LanguageToolMarker(org.omegat.languagetools.LanguageToolWrapper.LanguageToolMarker) Mark(org.omegat.gui.editor.mark.Mark) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 Mark (org.omegat.gui.editor.mark.Mark)2 LanguageToolMarker (org.omegat.languagetools.LanguageToolWrapper.LanguageToolMarker)2