seed: greeting app with failing greeting test
This commit is contained in:
1 parent
3298c270fc
commit
9e459c4028
7 files changed
+50
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
bin/
|
||||||
|
obj/
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Hello.Tests;
|
||||||
|
|
||||||
|
public class GreetingTests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void GreetsOpenForge()
|
||||||
|
{
|
||||||
|
Assert.Equal("Hello, OpenForge!", Greeting.Get());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||||
|
<PackageReference Include="xunit" Version="2.9.2" />
|
||||||
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="../Hello/Hello.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Hello;
|
||||||
|
|
||||||
|
public static class Greeting
|
||||||
|
{
|
||||||
|
public static string Get() => "Hello, World!";
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<RootNamespace>Hello</RootNamespace>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Console.WriteLine(Hello.Greeting.Get());
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<Solution>
|
||||||
|
<Project Path="Hello/Hello.csproj" />
|
||||||
|
<Project Path="Hello.Tests/Hello.Tests.csproj" />
|
||||||
|
</Solution>
|
||||||
Reference in new issue
Block a user