Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Commit 8f67c80

Browse files
committed
add xmldoc generation test
1 parent d6d1729 commit 8f67c80

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/dotnet-new.Tests/CommonScenarioTests.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,29 @@ public void TestLibrary()
9494
.Should().Pass();
9595
}
9696

97+
[Fact]
98+
public void TestXmlDoc()
99+
{
100+
var rootPath = Temp.CreateDirectory().Path;
101+
102+
TestAssets.CopyDirTo("TestLibrary", rootPath);
103+
TestAssets.CopyDirTo("TestSuiteProps", rootPath);
104+
105+
Func<string,TestCommand> test = name => new TestCommand(name) { WorkingDirectory = rootPath };
106+
107+
test("dotnet")
108+
.Execute($"restore {RestoreDefaultArgs} {RestoreSourcesArgs(NugetConfigSources)} {RestoreProps()}")
109+
.Should().Pass();
110+
111+
Assert.Equal(false, File.Exists(Path.Combine(rootPath, "doc.xml")));
112+
113+
test("dotnet")
114+
.Execute($"build {LogArgs} /p:DocumentationFile=doc.xml")
115+
.Should().Pass();
116+
117+
Assert.Equal(true, File.Exists(Path.Combine(rootPath, "doc.xml")));
118+
}
119+
97120
[Fact]
98121
public void TestMultipleLibraryInSameDir()
99122
{

0 commit comments

Comments
 (0)