public void SetServerNameTest() { String nullString = ""; Assert.IsFalse(m_communications.SetServerName(nullString)); String expected = "testing"; Assert.IsTrue(m_communications.SetServerName(expected)); String actual = m_communications.GetServerName(); Assert.AreEqual(expected, actual); }
public void SaveXMLVariablesFileTest() { String expected = @"c:\temp"; String pathToVariablesFile = @"c:\temp\testingsavefile.xml"; m_globals.SetpathToVariablesFile(pathToVariablesFile); m_communications.SetPortNumber(expected); m_communications.SetServerName(expected); m_globals.Set_MyMediaPlayerPath(expected); m_globals.Set_tempPath(expected); m_globals.Set_VLCPath(expected); m_globals.SaveXMLVariablesFile(); m_communications.SetPortNumber(null); m_communications.SetServerName(null); m_globals.Set_MyMediaPlayerPath(null); m_globals.Set_tempPath(null); m_globals.Set_VLCPath(null); m_globals.LoadXMLVariablesFile(); String actual = m_globals.GetpathToVariablesFile(); Assert.AreEqual(pathToVariablesFile, actual); actual = m_communications.GetPortNumber(); Assert.AreEqual(expected, actual); actual = m_communications.GetServerName(); Assert.AreEqual(expected, actual); actual = m_globals.Get_MyMediaPlayerPath(); Assert.AreEqual(expected, actual); actual = m_globals.Get_tempPath(); Assert.AreEqual(expected, actual); actual = m_globals.Get_VLCPath(); Assert.AreEqual(expected, actual); }