head.setTitle(title);
@Test public void testContentLineLineNote() { OrgHead head = new OrgHead(); OrgNodeInList nodeInList = new OrgNodeInList(1, 1, head); head.setTitle("Title"); String out = parserWriter.whiteSpacedFilePreface("Content.\n\n") + parserWriter.whiteSpacedHead(nodeInList, false); Assert.assertEquals("Content.\n\n* Title\n", out); }
@Test public void testContentLineNote() { OrgHead head = new OrgHead(); OrgNodeInList nodeInList = new OrgNodeInList(1, 1, head); head.setTitle("Title"); String out = parserWriter.whiteSpacedFilePreface("Content.\n") + parserWriter.whiteSpacedHead(nodeInList, false); Assert.assertEquals("Content.\n\n* Title\n", out); }
@Test public void testContentLineLineLineNote() { OrgHead head = new OrgHead(); OrgNodeInList nodeInList = new OrgNodeInList(1, 1, head); head.setTitle("Title"); String out = parserWriter.whiteSpacedFilePreface("Content.\n\n\n") + parserWriter.whiteSpacedHead(nodeInList, false); Assert.assertEquals("Content.\n\n* Title\n", out); }
@Test public void testContentNote() { OrgHead head = new OrgHead(); OrgNodeInList headElement = new OrgNodeInList(1, 1, head); head.setTitle("Title"); String out = parserWriter.whiteSpacedFilePreface("Content.") + parserWriter.whiteSpacedHead(headElement, false); Assert.assertEquals("Content.\n\n* Title\n", out); }
@Test public void testContentLineStartingWithStar() { OrgHead head = new OrgHead(); OrgNodeInList nodeInList = new OrgNodeInList(1, 1, head); head.setTitle("Title"); head.setContent("*bold*"); String out = parserWriter.whiteSpacedHead(nodeInList, false); Assert.assertEquals("* Title\n\n*bold*\n\n", out); }
@Test public void testContentLineStartingWithStarAndSpace() { OrgHead head = new OrgHead(); OrgNodeInList nodeInList = new OrgNodeInList(1, 1, head); head.setTitle("Title"); head.setContent("* list item"); String out = parserWriter.whiteSpacedHead(nodeInList, false); Assert.assertEquals("* Title\n\n * list item\n\n", out); }