Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/GuiRunner/TestModel.Tests/TestCentricProjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,24 @@ public void Load_SetsProjectPath()
Assert.That(loadedProject.ProjectPath, Is.EqualTo("TestCentricTestProject.tcproj"));
}

[Test]
public void Load_SetsTestFiles()
{
// 1. Arrange
TestCentricProject project = new TestCentricProject(new GuiOptions("Test1.dll", "Test2.dll"));
project.SaveAs("TestCentricTestProject.tcproj");

TestCentricProject loadedProject = new TestCentricProject();

// 2. Act
loadedProject.Load("TestCentricTestProject.tcproj");

// 3. Assert
Assert.That(loadedProject.TestFiles.Count, Is.EqualTo(2));
Assert.That(loadedProject.TestFiles[0], Does.EndWith("Test1.dll"));
Assert.That(loadedProject.TestFiles[1], Does.Contain("Test2.dll"));
}

#endregion

#region FileName and ProjectPath Tests
Expand Down
5 changes: 5 additions & 0 deletions src/GuiRunner/TestModel/TestCentricProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ public void Load(string path)
}
}

// Update the list of test files
TestFiles.Clear();
foreach (TestPackage subPackage in TopLevelPackage.SubPackages)
TestFiles.Add(subPackage.FullName);

bool FindTestCentricProjectElement()
{
while (xmlReader.Read())
Expand Down