public void fillDataArrayToTableTest() { DataClassesDataContext db = new DataClassesDataContext("Data Source=FIREFLY-PC;Initial Catalog=LASDB;Integrated Security=True"); FillTable ft = new FillTable(10, 7); Table table = new Table(); ft.creatDataArray(db.Duty.ToList()); ft.fillDataArrayToTable(table, NoValueDisplay.NoValueString); Assert.IsNotNull(table); }
public void creatDataArrayTest() { FillTable fillTable = new FillTable(10, 7); DataClassesDataContext db = new DataClassesDataContext("Data Source=FIREFLY-PC;Initial Catalog=LASDB;Integrated Security=True"); List<Duty> dutys = db.Duty.ToList(); fillTable.creatDataArray(db.Duty.ToList()); foreach (Duty duty in dutys) { Assert.IsTrue(fillTable.DataArray[duty.time][duty.day - 1].Any(d=> d==duty.Assistants.name)); } }