@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 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 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()); }
@Test public void basicValueEntry4cTest() { BasicValueCreator creator = CSVBasicValueCreator.makeCreator("4c_2_2"); BasicValue bv1990 = creator.create("4c_2_2", "11", "1990", "Q4 Table4c"); creator = CSVBasicValueCreator.makeCreator("4c_2_2"); BasicValue bv1991 = creator.create("4c_2_2", "22", "1991", "Q4 Table4c"); creator = CSVBasicValueCreator.makeCreator("4c_2_2"); BasicValue bv2010 = creator.create("4c_2_2", "33", "2010", "Q4 Table4c"); creator = CSVBasicValueCreator.makeCreator("4c_2_2"); BasicValue bv2011 = creator.create("4c_2_2", "44", "2011", "Q4 Table4c"); assertEquals("11", bv1990.getContent()); assertEquals("22", bv1991.getContent()); assertEquals("33", bv2010.getContent()); assertEquals("44", bv2011.getContent()); assertEquals("4c_2_2_", bv1990.getReference()); assertEquals("4c_3_2_", bv1991.getReference()); assertEquals("4c_23_2_", bv2010.getReference()); assertEquals("4c_24_2_", bv2011.getReference()); }