public void TestAddTFSNodeF() { SavedSetting setting = SavedSetting.GetInstance(); TFSNode node = new TFSNode() { LabelName = "1", FieldName = "2" }; TFSNode node2 = new TFSNode() { LabelName = "1", FieldName = "2" }; setting.Clear(); Assert.IsTrue(setting.AddTFSNode(node)); Assert.IsFalse(setting.AddTFSNode(node)); Assert.IsFalse(setting.AddTFSNode(node2)); Assert.AreEqual(1, setting.TFSSize); Assert.AreEqual(1, setting.Size); Assert.AreEqual(0, setting.ExcelSize); }
public void TestClear() { SavedSetting setting = SavedSetting.GetInstance(); ExcelNode enode = new ExcelNode(); setting.AddExcelNode(enode); TFSNode tnode = new TFSNode(); setting.AddTFSNode(tnode); setting.Clear(); Assert.AreEqual(0, setting.ExcelSize); Assert.AreEqual(0, setting.Size); Assert.AreEqual(0, setting.TFSSize); }
public void TestClearTFSNodesList() { SavedSetting setting = SavedSetting.GetInstance(); setting.Clear(); ExcelNode enode = new ExcelNode() { LabelName = "1", FieldName = "2", ColumnNum = 3 }; setting.AddExcelNode(enode); TFSNode tnode = new TFSNode() { LabelName = "1", FieldName = "2" }; setting.AddTFSNode(tnode); setting.ClearTFSNodesList(); Assert.AreEqual(1, setting.ExcelSize); Assert.AreEqual(1, setting.Size); Assert.AreEqual(0, setting.TFSSize); }