public class LayoutEntryTest
extends TestCase
The test class LayoutEntryTest test the net.sf.jabref.export.layout.LayoutEntry.
Indirectly the net.sf.jabref.export.layout.Layout is testet too.
The LayoutEntry creates a human readable String assinged with html formaters.
To test the Highlighting Feature, an instance of LayoutEntry will be instatiated via Layout and LayoutHelper.
With these instance the doLayout() Method is called several times for each test case.
To simulate a search, a BibtexEntry will be created, wich will be used by LayoutEntry.
The definiton of the search is set by
LayoutEntry.setWordsToHighlight(words); and
Globals.prefs.putBoolean("caseSensitiveSearch", false);
There are five test cases:
- The shown result text has no words which should be highlighted.
- There is one word which will be highlighted ignoring case sensitivity.
- There are two words which will be highlighted ignoring case sensitivity.
- There is one word which will be highlighted case sensitivity.
- There are more words which will be highlighted case sensitivity.
- Author:
- Arne