ci: 👷 Change CI to add test files
Some checks failed
Tests / Unit Testing1 (push) Failing after 40s

This commit is contained in:
Louis Gallet 2023-11-02 19:48:23 +01:00
parent de2eb52756
commit 0d06576f8b
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY
5 changed files with 14 additions and 1 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -16,5 +16,10 @@ jobs:
dotnet-version: '7.0.x'
- name: "🏗️ Build"
run: dotnet build
- name: "🗃️ Setup file"
# Add files into /Tests/bin/Debug/net7.0 and create thisfileexist.txt
run: |
mkdir -p Tests/bin/Debug/net7.0
echo "incredible file" > thisfileexist.txt
- name: "✅ Test"
run: dotnet test

BIN
Tests/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -2,5 +2,12 @@ namespace Tests.Stream;
public class StreamTest
{
[Theory]
[InlineData("thisfileexist.txt", true)]
[InlineData("thisfiledontexist.txt", false)]
public void ExistFileTest(string filePath, bool expected)
{
Assert.Equal(expected, global::Stream.Stream.ExistFile(filePath));
}
}

View File

@ -24,6 +24,7 @@
<ItemGroup>
<ProjectReference Include="..\Iteration\Iteration.csproj" />
<ProjectReference Include="..\Stream\Stream.csproj" />
</ItemGroup>
</Project>