added xUnit Tests
Some checks failed
csharp-secdevops-pipeline-pod/pipeline/head There was a failure building this commit
Some checks failed
csharp-secdevops-pipeline-pod/pipeline/head There was a failure building this commit
This commit is contained in:
21
MyHelloWorld.Tests/UnitTest1.cs
Normal file
21
MyHelloWorld.Tests/UnitTest1.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Xunit;
|
||||
using MyHelloWorld; // Dein Namespace der Haupt-App
|
||||
|
||||
namespace MyHelloWorld.Tests
|
||||
{
|
||||
public class HelloTests
|
||||
{
|
||||
[Fact]
|
||||
public void GetGreeting_ShouldReturnCorrectText()
|
||||
{
|
||||
// Arrange
|
||||
var generator = new HelloGenerator();
|
||||
|
||||
// Act
|
||||
var result = generator.GetGreeting();
|
||||
|
||||
// Assert
|
||||
Assert.Equal("Hello World", result);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user