@Test public void basicValueEntry8Test() { BasicValueCreator creator = CSVBasicValueCreator.makeCreator("8a_3"); BasicValue bv = creator.create("8a_3", "3433", "2004", "Q1 dfsdf"); assertEquals("3433", bv.getContent()); assertEquals("8a_3_3_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); creator = CSVBasicValueCreator.makeCreator("8a_4"); bv = creator.create("8a_4", "3433", "2011", "Q1 dfsdf"); assertEquals("3433", bv.getContent()); assertEquals("8a_8_7_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); }
@Test public void basicValueStandardTest() { BasicValueCreator creator = CSVBasicValueCreator.makeCreator("8a_3_345"); BasicValue bv = creator.create("8a_3_345", "3433", "2001", "Q1 dfsdf"); assertEquals("3433", bv.getContent()); assertEquals("8a_3_345_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); creator = CSVBasicValueCreator.makeCreator("8a_3_345"); bv = creator.create("8a_3_345", "3", "2001", "Q1 Tiers"); assertEquals("Tier 3", bv.getContent()); assertEquals("8a_3_345_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); }
@Test public void basicValueThreeYearsTest() { BasicValueCreator creator = CSVBasicValueCreator.makeCreator("17_3"); BasicValue bv = creator.create("17_3", "34433", "2010", "Q1 dfsdf"); assertEquals("34433", bv.getContent()); assertEquals("17_3_3_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); creator = CSVBasicValueCreator.makeCreator("140_1"); bv = creator.create("140_1", "34433", "2005", "Q1 dfsdf"); assertEquals("34433", bv.getContent()); assertEquals("140_1_2_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); }
@Test public void basicValueEntry3bTest() { BasicValueCreator creator = CSVBasicValueCreator.makeCreator("3b_3"); BasicValue bv = creator.create("3b_3", "34433", "2000", "Q1 dfsdf"); assertEquals("34433", bv.getContent()); assertEquals("3b_3_4_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); }
@Test public void basicValueBracketTest() { BasicValueCreator creator = CSVBasicValueCreator.makeCreator("8a_3(6)"); BasicValue bv = null; bv = creator.create("8a_3(6)", "34433", "2005", "Q1 dfsdf"); assertEquals("34433", bv.getContent()); assertEquals("8a_3_8_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); }
@Test public void basicValueEntry16Test() { BasicValueCreator creator = CSVBasicValueCreator.makeCreator("16a_2*"); BasicValue bv = creator.create("16a_2", "3433", "2003", "Q1 dfsdf"); assertEquals("3433", bv.getContent()); assertEquals("16a_2_4_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); creator = CSVBasicValueCreator.makeCreator("16a_3*"); bv = creator.create("16a_3", "3433", "2011", "Q1 dfsdf"); assertEquals("3433", bv.getContent()); assertEquals("16a_7_5_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); creator = CSVBasicValueCreator.makeCreator("16b_3*"); bv = creator.create("16b_3", "3433", "2010", "Q1 dfsdf"); assertEquals("3433", bv.getContent()); assertEquals("16b_7_4_", bv.getReference()); assertEquals("numeric", bv.getType()); assertEquals(new Long(1), bv.getQuestionId()); }