public void GetProjectPath_ProjectDoesnExists_ReturnsNull() { CreateXmlDoc(); ConfigurationBase myXml = new ConfigurationXmlFile(_doc); string retVal = myXml.GetProjectPath("test"); Assert.IsNull(retVal); }
public void SaveProject_ProjectExists_ReturnsTrueAndChangeData() { CreateXmlDoc(3); ConfigurationBase myXml = new ConfigurationXmlFile(_doc); bool retVal = myXml.SaveProject("Name1", "Fake"); Assert.IsTrue(retVal); Assert.IsTrue(myXml.GetProjectPath("Name1").StartsWith(@"Fake")); }
public void GetProjectPath_ProjectExists_ReturnsPath() { CreateXmlDoc(3); ConfigurationBase myXml = new ConfigurationXmlFile(_doc); string retVal = myXml.GetProjectPath("Name1"); Assert.IsNotNull(retVal); Assert.IsTrue(retVal.StartsWith(@"C:\Windows\")); }
public void RemoveProject_ProjectExists_ReturnsTrueAndWholeProjectIsRemoved() { CreateXmlDoc(); ConfigurationBase myXml = new ConfigurationXmlFile(_doc); bool retVal = myXml.RemoveProject("Name0"); Assert.IsTrue(retVal); Assert.IsNull(myXml.GetProjectPath("Name0")); }
public void GetProjectPath_EmptyConfigFile_ReturnsNull() { XmlDocument doc = new XmlDocument(); doc.LoadXml("<VBProjects></VBProjects>"); ConfigurationBase myXml = new ConfigurationXmlFile(doc); string retVal = myXml.GetProjectPath("test"); Assert.IsNull(retVal); }