public void parseClassShouldWork() { //Data testClass tester = new testClass(); testComp.Add("boolTest", TableRep.DType.boolean); testComp.Add("byteTest", TableRep.DType.Tint); testComp.Add("shortTest", TableRep.DType.Sint); testComp.Add("intTest", TableRep.DType.Rint); testComp.Add("longTest", TableRep.DType.Lint); testComp.Add("decimalTest", TableRep.DType.dec); testComp.Add("doubleTest", TableRep.DType.dec); testComp.Add("charTest", TableRep.DType.ch); testComp.Add("sbyteTest", TableRep.DType.Rint); testComp.Add("ushortTest", TableRep.DType.Rint); testComp.Add("uintTest", TableRep.DType.Rint); testComp.Add("ulongTest", TableRep.DType.Lint); testComp.Add("stringTest", TableRep.DType.vchar); TableRep testTable = new TableRep(); testTable.setColumns(testComp); testTable.setTableName("tester"); TableRep comp = ParseClass.parseClass(tester); comp.setTableName("tester"); Assert.Equal(testTable.getColumns(), comp.getColumns()); Assert.Equal(testTable.getTableName(), comp.getTableName()); }
public void setTableNameShouldWork(string test, string expected) { TableRep testComp = new TableRep(); testComp.setTableName(test); Assert.Equal(testComp.getTableName(), expected); }
public void sendToParserShouldWork() { testClass tester = new testClass(); testComp.Add("boolTest", TableRep.DType.boolean); testComp.Add("byteTest", TableRep.DType.Tint); testComp.Add("shortTest", TableRep.DType.Sint); testComp.Add("intTest", TableRep.DType.Rint); testComp.Add("longTest", TableRep.DType.Lint); testComp.Add("decimalTest", TableRep.DType.dec); testComp.Add("doubleTest", TableRep.DType.dec); testComp.Add("charTest", TableRep.DType.ch); testComp.Add("sbyteTest", TableRep.DType.Rint); testComp.Add("ushortTest", TableRep.DType.Rint); testComp.Add("uintTest", TableRep.DType.Rint); testComp.Add("ulongTest", TableRep.DType.Lint); testComp.Add("stringTest", TableRep.DType.vchar); TableRep testCompTableRep = new TableRep(); testCompTableRep.setTableName("testClass"); testCompTableRep.setColumns(testComp); }
public void setTableShouldThrowException(string test) { TableRep testComp = new TableRep(); Assert.Throws <ArgumentException>(() => testComp.setTableName(test)); }