public void Save100() { string savePath = Path.Combine(TestSupport.CreatedFilesDirectory, "Save.dtc"); TestCasesRoot root = TestCasesRoot.CreateSimpleTable(); root.Save(savePath); root.New(); root.Load(savePath); Assert.That(TestSupport.CompareFile(TestSupport.CreatedFilesDirectory, TestSupport.ReferenceFilesDirectory, Path.GetFileName(savePath))); //ProcessStartInfo info = new ProcessStartInfo(@"C:\Program Files (x86)\Notepad++\notepad++.exe", savePath); //Process.Start(info); }
public void SaveTestCaseDescription() { string savePath = Path.Combine(TestSupport.CreatedFilesDirectory, "Save.dtc"); TestCasesRoot root = TestCasesRoot.CreateSimpleTable(); root.TestCases[0].Description = "test description"; Assert.True(root.TestCases[1].Description == ""); root.Save(savePath); root.New(); root.Load(savePath); Assert.True(root.TestCases[0].Description == "test description"); Assert.True(root.TestCases[1].Description == ""); }
public void ClearAllFieldsOnNewTest() { TestCasesRoot testCasesRoot = new TestCasesRoot(); testCasesRoot.CreateSampleProject(); // create and save the sample project string savePath = Path.Combine(TestSupport.CreatedFilesDirectory, "SampleProject.dtc"); testCasesRoot.Save(savePath); //ProcessStartInfo info = new ProcessStartInfo(@"C:\Program Files (x86)\Notepad++\notepad++.exe", savePath); //Process.Start(info); testCasesRoot.New(); savePath = Path.Combine(TestSupport.CreatedFilesDirectory, "EmptyProject.dtc"); testCasesRoot.Save(savePath); //ProcessStartInfo info = new ProcessStartInfo(@"C:\Program Files (x86)\Notepad++\notepad++.exe", savePath); //Process.Start(info); Assert.That(testCasesRoot.Description == String.Empty); Assert.That(testCasesRoot.Actions != null && testCasesRoot.Actions.Count == 0); Assert.That(testCasesRoot.Conditions != null && testCasesRoot.Conditions.Count == 0); Assert.That(testCasesRoot.TestCases != null && testCasesRoot.TestCases.Count == 0); }