From 737643d8f3080323d0c07af36b71018b3a8872a6 Mon Sep 17 00:00:00 2001 From: nakamurakko <28667444+nakamurakko@users.noreply.github.com> Date: Sun, 5 Feb 2023 18:31:13 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SampleLib/SampleLib.sln | 8 ++++- SampleLib/SampleLibTest/SampleLibTest.csproj | 32 ++++++++++++++++++++ SampleLib/SampleLibTest/UnitTestGreeting.cs | 17 +++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 SampleLib/SampleLibTest/SampleLibTest.csproj create mode 100644 SampleLib/SampleLibTest/UnitTestGreeting.cs diff --git a/SampleLib/SampleLib.sln b/SampleLib/SampleLib.sln index 0009b97..29ad6f3 100644 --- a/SampleLib/SampleLib.sln +++ b/SampleLib/SampleLib.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.4.33205.214 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleLib", "SampleLib\SampleLib.csproj", "{CC404675-E152-4C4D-B871-F4BCEDEB9908}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleLib", "SampleLib\SampleLib.csproj", "{CC404675-E152-4C4D-B871-F4BCEDEB9908}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleLibTest", "SampleLibTest\SampleLibTest.csproj", "{DED3140B-E9A3-43B8-88F4-B703261C8913}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {CC404675-E152-4C4D-B871-F4BCEDEB9908}.Debug|Any CPU.Build.0 = Debug|Any CPU {CC404675-E152-4C4D-B871-F4BCEDEB9908}.Release|Any CPU.ActiveCfg = Release|Any CPU {CC404675-E152-4C4D-B871-F4BCEDEB9908}.Release|Any CPU.Build.0 = Release|Any CPU + {DED3140B-E9A3-43B8-88F4-B703261C8913}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DED3140B-E9A3-43B8-88F4-B703261C8913}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DED3140B-E9A3-43B8-88F4-B703261C8913}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DED3140B-E9A3-43B8-88F4-B703261C8913}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SampleLib/SampleLibTest/SampleLibTest.csproj b/SampleLib/SampleLibTest/SampleLibTest.csproj new file mode 100644 index 0000000..0b2a8c2 --- /dev/null +++ b/SampleLib/SampleLibTest/SampleLibTest.csproj @@ -0,0 +1,32 @@ + + + + net6.0 + disable + enable + + false + + nakamurakko + + @ nakamurakko + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/SampleLib/SampleLibTest/UnitTestGreeting.cs b/SampleLib/SampleLibTest/UnitTestGreeting.cs new file mode 100644 index 0000000..db30359 --- /dev/null +++ b/SampleLib/SampleLibTest/UnitTestGreeting.cs @@ -0,0 +1,17 @@ +using SampleLib; +using Xunit; + +namespace SampleLibTest +{ + public class UnitTestGreeting + { + [Fact] + public async void TestGreeting() + { + var reply = await new Greeting().Reply("hoge"); + + Assert.True(reply is string); + Assert.Equal("Hello hoge.", reply); + } + } +} \ No newline at end of file