public void Initialize() { SqlBuildManager.Enterprise.EnterpriseConfiguration cfg = new EnterpriseConfiguration(); TableWatch tmp = new TableWatch(); tmp.Description = "For Testing"; tmp.EmailBody = "Email Body for Testing"; tmp.EmailSubject = "Email subject for testing"; Notify n = new Notify(); n.EMail = "*****@*****.**"; Notify b = new Notify(); n.EMail = "*****@*****.**"; tmp.Notify = new Notify[2]; tmp.Notify[0] = n; tmp.Notify[1] = b; tmp.Table = new Table[2]; Table t = new Table(); t.Name = "SqlBuild_Logging"; Table a = new Table(); a.Name = "master"; tmp.Table[0] = t; tmp.Table[1] = a; cfg.TableWatch = new TableWatch[1]; cfg.TableWatch[0] = tmp; EnterpriseConfigHelper.EnterpriseConfig = cfg; }
public void DescriptionTest() { TableWatch target = new TableWatch(); string expected = "Here is the description"; string actual; target.Description = expected; actual = target.Description; Assert.AreEqual(expected, actual); }
public void EmailBodyTest() { TableWatch target = new TableWatch(); string expected = "Here is the e-mail body"; string actual; target.EmailBody = expected; actual = target.EmailBody; Assert.AreEqual(expected, actual); }
public void EmailSubjectTest() { TableWatch target = new TableWatch(); string expected = "Here is the e-mail subject"; string actual; target.EmailSubject = expected; actual = target.EmailSubject; Assert.AreEqual(expected, actual); }
public void FoundTablesTest() { TableWatch target = new TableWatch(); List <string> expected = new List <string>(); expected.Add("Table1"); expected.Add("Table2"); expected.Add("Table3"); List <string> actual; target.FoundTables = expected; actual = target.FoundTables; Assert.AreEqual(expected, actual); }
public TableWatchControl(TableWatch watch) : this() { this.watch = watch; }