-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Unit Tests and Improve Code Coverage (#47)
* Update Program.cs * Create Testable.cs * Update Program.cs * Update POCTemplate.Tests.csproj * Update UnitTest1.cs * Create TestableTests.cs
- Loading branch information
Showing
5 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
namespace POCTemplate; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace POCTemplate; | ||
|
||
[ExcludeFromCodeCoverage] | ||
internal static class Program | ||
{ | ||
public static void Main() | ||
static void Main(string[] args) | ||
{ | ||
// This is a placeholder for the main entry point of the application. | ||
Console.WriteLine("Hello, World!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace POCTemplate; | ||
|
||
public class Testable | ||
{ | ||
public bool TestableMethod() | ||
{ | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using FluentAssertions; | ||
|
||
namespace POCTemplate.Tests; | ||
|
||
public class TestableTests | ||
{ | ||
[Fact] | ||
public void TestableMethod_StateUnderTest_ExpectedBehavior() | ||
{ | ||
// Arrange | ||
var testable = new Testable(); | ||
|
||
// Act | ||
var result = testable.TestableMethod(); | ||
|
||
// Assert | ||
result.Should().BeTrue(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters