public void ClientKeyPortCreation() { int port = 56800; string id = null; string name = "TestClt"; string appPath = "TestClt\\qewqew \\qwerq\\qwer"; string logPath = "TestClt\\245\\vfd erw5\\wregerw"; int timeout = 345; bool mail = false; bool logAttach = true; int queueSize = 56; ClientDataManager cdm = new ClientDataManager(); Assert.IsFalse(cdm.ContainsPort(port)); Assert.IsFalse(cdm.ContainsName(name)); ClientData clt = cdm.CreateClient(ClientIdType.KeyByUdpPort, id, port, name, appPath, logPath, timeout, mail, logAttach, queueSize); Assert.IsTrue(cdm.ContainsPort(port)); Assert.IsTrue(cdm.ContainsName(name)); Assert.IsFalse(cdm.ContainsId(id)); Assert.AreEqual(port, clt.Port); Assert.AreEqual(name, clt.Name); Assert.AreEqual(appPath, clt.AppFilePath); Assert.AreEqual(logPath, clt.LogFilePath); Assert.AreEqual(timeout, clt.Timeout); Assert.AreEqual(mail, clt.MailEnabled); Assert.AreEqual(logAttach, clt.LogAttachEnabled); Assert.AreEqual(queueSize, clt.QueueSize); ClientData newclt = cdm.GetClient(port); Assert.AreEqual(clt, newclt); Assert.AreEqual(1, cdm.List.Length); cdm.Delete(newclt.ClientId); Assert.AreEqual(0, cdm.List.Length); }