Skip to content

Commit bd6597d

Browse files
committed
adding test coverage back
1 parent 7e1eea1 commit bd6597d

File tree

6 files changed

+75
-4
lines changed

6 files changed

+75
-4
lines changed

.github/workflows/internal-pr-build-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
run: dotnet restore
2323
- name: Build
2424
run: dotnet build -c Release --no-restore
25-
# - name: Test
26-
# run: dotnet test --no-build --verbosity normal
25+
- name: Test
26+
run: dotnet test --no-build --verbosity normal
2727

2828
# create archive in \src\CodeQLToolkit.Core\bin\Release\net6.0\publish\linux-x64
2929
- name: Create Build Bundle (Linux)

CodeQLToolkit.sln

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VisualStudioVersion = 17.6.33801.468
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{667B480C-D805-4A9C-AC1F-D9FCCF3DB57C}"
77
EndProject
8-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{05645E0E-835A-4627-BDAE-C27EC39B23EE}"
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{05645E0E-835A-4627-BDAE-C27EC39B23EE}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{3038EA53-8F37-4B35-AA50-FDFDDFF0F264}"
1111
ProjectSection(SolutionItems) = preProject
@@ -25,7 +25,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2525
.github\workflows\release-build.yml = .github\workflows\release-build.yml
2626
EndProjectSection
2727
EndProject
28-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeQLToolkit.Features", "src\CodeQLToolkit.Features\CodeQLToolkit.Features.csproj", "{B85F1529-3321-4AD2-924A-6EA478145DC5}"
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeQLToolkit.Features", "src\CodeQLToolkit.Features\CodeQLToolkit.Features.csproj", "{B85F1529-3321-4AD2-924A-6EA478145DC5}"
29+
EndProject
30+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeQLToolkit.Shared.Tests", "test\CodeQLToolkit.Shared.Tests\CodeQLToolkit.Shared.Tests.csproj", "{E57121C2-2A2E-487C-9C32-A7D8914E9123}"
2931
EndProject
3032
Global
3133
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -49,6 +51,10 @@ Global
4951
{B85F1529-3321-4AD2-924A-6EA478145DC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
5052
{B85F1529-3321-4AD2-924A-6EA478145DC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
5153
{B85F1529-3321-4AD2-924A-6EA478145DC5}.Release|Any CPU.Build.0 = Release|Any CPU
54+
{E57121C2-2A2E-487C-9C32-A7D8914E9123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55+
{E57121C2-2A2E-487C-9C32-A7D8914E9123}.Debug|Any CPU.Build.0 = Debug|Any CPU
56+
{E57121C2-2A2E-487C-9C32-A7D8914E9123}.Release|Any CPU.ActiveCfg = Release|Any CPU
57+
{E57121C2-2A2E-487C-9C32-A7D8914E9123}.Release|Any CPU.Build.0 = Release|Any CPU
5258
EndGlobalSection
5359
GlobalSection(SolutionProperties) = preSolution
5460
HideSolutionNode = FALSE
@@ -58,6 +64,7 @@ Global
5864
{4C5C87E8-46E8-41D3-9CF9-F77148C432AF} = {667B480C-D805-4A9C-AC1F-D9FCCF3DB57C}
5965
{A1F78CBC-9AE9-4360-A06B-395F368B183A} = {05645E0E-835A-4627-BDAE-C27EC39B23EE}
6066
{B85F1529-3321-4AD2-924A-6EA478145DC5} = {667B480C-D805-4A9C-AC1F-D9FCCF3DB57C}
67+
{E57121C2-2A2E-487C-9C32-A7D8914E9123} = {05645E0E-835A-4627-BDAE-C27EC39B23EE}
6168
EndGlobalSection
6269
GlobalSection(ExtensibilityGlobals) = postSolution
6370
SolutionGuid = {BF8F3B81-F4DC-4608-A41C-F00F3E5A05CA}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
8+
<IsPackable>false</IsPackable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
13+
<PackageReference Include="NUnit" Version="3.13.3" />
14+
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
15+
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
16+
<PackageReference Include="coverlet.collector" Version="3.1.2" />
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<ProjectReference Include="..\..\src\CodeQLToolkit.Shared\CodeQLToolkit.Shared.csproj" />
21+
</ItemGroup>
22+
23+
</Project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace CodeQLToolkit.Shared.Tests
2+
{
3+
public class Tests
4+
{
5+
[SetUp]
6+
public void Setup()
7+
{
8+
}
9+
10+
[Test]
11+
public void Test1()
12+
{
13+
Assert.Pass();
14+
}
15+
}
16+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
global using NUnit.Framework;
2+
global using CodeQLToolkit.Shared.Utils;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace CodeQLToolkit.Shared.Tests.Utils
8+
{
9+
public class FileUtilsTest
10+
{
11+
[SetUp]
12+
public void Setup()
13+
{
14+
}
15+
16+
[Test]
17+
public void TestCreateTempDirectory()
18+
{
19+
var dir = FileUtils.CreateTempDirectory();
20+
Assert.IsTrue(Directory.Exists(dir));
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)