Skip to content

Commit 9529a2d

Browse files
committed
Rebuilt library to support testing.
1 parent 7539ce6 commit 9529a2d

File tree

10 files changed

+76
-294
lines changed

10 files changed

+76
-294
lines changed

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
build:
2-
dotnet pack "$(shell pwd)/NETStandardClassLibraryTemplate.csproj"
2+
dotnet build NETStandardClassLibrary/*.csproj
33

4-
install:
5-
dotnet new --install "$(shell pwd)/bin/Debug/com.scottdoxey.netstandardclasslibrary.*.nupkg"
6-
7-
uninstall:
8-
dotnet new --uninstall com.scottdoxey.netstandardclasslibrary
4+
test:
5+
dotnet test NETCoreAppClassLibraryTest/*.csproj
96

107
clean:
118
git clean -xdf
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<RootNamespace>NETCoreAppClassLibraryTest</RootNamespace>
5+
<IsPackable>false</IsPackable>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<PackageReference Include="nunit" Version="3.12.0" />
9+
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0-alpha.1" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0-preview-20200921-01" />
11+
</ItemGroup>
12+
<ItemGroup>
13+
<ProjectReference Include="..\NETStandardClassLibrary\NETStandardClassLibrary.csproj" />
14+
</ItemGroup>
15+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using NETStandardClassLibrary;
2+
using NUnit.Framework;
3+
4+
namespace NETCoreAppClassLibraryTest
5+
{
6+
7+
public class SampleClassTest
8+
{
9+
10+
[Test]
11+
public void AddNumbersTest()
12+
{
13+
14+
Assert.AreEqual(2, SampleClass.AddNumbers(1, 1));
15+
16+
}
17+
18+
}
19+
20+
}

NETStandardClassLibrary/.editorconfig

Lines changed: 0 additions & 262 deletions
This file was deleted.

NETStandardClassLibrary/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

NETStandardClassLibrary/Makefile

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace NETStandardClassLibrary
2+
{
3+
4+
public static class SampleClass
5+
{
6+
7+
public static float AddNumbers(float a, float b)
8+
{
9+
10+
return a + b;
11+
12+
}
13+
14+
}
15+
16+
}

NETStandardClassLibraryTemplate.csproj

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NETStandardClassLibrary", "NETStandardClassLibrary\NETStandardClassLibrary.csproj", "{4E15D87B-15F2-4143-89ED-75209AEAF7EB}"
4+
EndProject
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NETCoreAppClassLibraryTest", "NETCoreAppClassLibraryTest\NETCoreAppClassLibraryTest.csproj", "{6C2DDEFD-D0A4-40F3-98FC-C108C2BE3F0C}"
6+
EndProject
7+
Global
8+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9+
Debug|Any CPU = Debug|Any CPU
10+
Release|Any CPU = Release|Any CPU
11+
EndGlobalSection
12+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13+
{4E15D87B-15F2-4143-89ED-75209AEAF7EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14+
{4E15D87B-15F2-4143-89ED-75209AEAF7EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
15+
{4E15D87B-15F2-4143-89ED-75209AEAF7EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
16+
{4E15D87B-15F2-4143-89ED-75209AEAF7EB}.Release|Any CPU.Build.0 = Release|Any CPU
17+
{6C2DDEFD-D0A4-40F3-98FC-C108C2BE3F0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18+
{6C2DDEFD-D0A4-40F3-98FC-C108C2BE3F0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
19+
{6C2DDEFD-D0A4-40F3-98FC-C108C2BE3F0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{6C2DDEFD-D0A4-40F3-98FC-C108C2BE3F0C}.Release|Any CPU.Build.0 = Release|Any CPU
21+
EndGlobalSection
22+
EndGlobal

0 commit comments

Comments
 (0)