Verified Commit 9cf70806 authored by Mark Malone's avatar Mark Malone
Browse files

fixing dotnet test main function

parent 7cae4f8b
Pipeline #3231 passed with stage
in 33 seconds
......@@ -7,7 +7,7 @@ namespace HelloWorld.Tests
public class HelloWorldTests
{
[Fact]
public void Test1()
public void TestHelloWorld()
{
Assert.Equal("Hello World!", HelloWorld.Program.HelloWorld());
}
......
......@@ -4,12 +4,12 @@ namespace HelloWorld
{
public class Program
{
static void Main(string[] args)
{
Console.WriteLine(HelloWorld());
}
public static string HelloWorld() {
return "Hello World!";
}
static void Main()
{
Console.WriteLine(HelloWorld());
}
}
}
dotnet test --collect:"XPlat Code Coverage"
dotnet reportgenerator "-reports:./HelloWorld.Tests/TestResults/*/coverage.cobertura.xml" "-targetdir:Reports_Coverage" -reportTypes:TextSummary;
dotnet reportgenerator "-reports:./HelloWorld.Tests/TestResults/*/coverage.cobertura.xml" "-targetdir:Reports_Coverage" -reportTypes:Html;
cat ./Reports_Coverage/Summary.txt
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment