Search in sources :

Example 1 with AutomaticGroup

use of org.jabref.model.groups.AutomaticGroup in project jabref by JabRef.

the class GroupSerializerTest method serializeSingleAutomaticKeywordGroup.

@Test
public void serializeSingleAutomaticKeywordGroup() {
    AutomaticGroup group = new AutomaticKeywordGroup("myAutomaticGroup", GroupHierarchyType.INDEPENDENT, "keywords", ',', '>');
    List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
    assertEquals(Collections.singletonList("0 AutomaticKeywordGroup:myAutomaticGroup;0;keywords;,;>;1;;;;"), serialization);
}
Also used : AutomaticKeywordGroup(org.jabref.model.groups.AutomaticKeywordGroup) AutomaticGroup(org.jabref.model.groups.AutomaticGroup) GroupTreeNodeTest(org.jabref.model.groups.GroupTreeNodeTest) Test(org.junit.Test)

Example 2 with AutomaticGroup

use of org.jabref.model.groups.AutomaticGroup in project jabref by JabRef.

the class GroupsParserTest method fromStringParsesAutomaticKeywordGroup.

@Test
public void fromStringParsesAutomaticKeywordGroup() throws Exception {
    AutomaticGroup expected = new AutomaticKeywordGroup("myAutomaticGroup", GroupHierarchyType.INDEPENDENT, "keywords", ',', '>');
    AbstractGroup parsed = GroupsParser.fromString("AutomaticKeywordGroup:myAutomaticGroup;0;keywords;,;>;1;;;;", ',');
    assertEquals(expected, parsed);
}
Also used : AutomaticKeywordGroup(org.jabref.model.groups.AutomaticKeywordGroup) AbstractGroup(org.jabref.model.groups.AbstractGroup) AutomaticGroup(org.jabref.model.groups.AutomaticGroup) Test(org.junit.Test)

Aggregations

AutomaticGroup (org.jabref.model.groups.AutomaticGroup)2 AutomaticKeywordGroup (org.jabref.model.groups.AutomaticKeywordGroup)2 Test (org.junit.Test)2 AbstractGroup (org.jabref.model.groups.AbstractGroup)1 GroupTreeNodeTest (org.jabref.model.groups.GroupTreeNodeTest)1