From 0d06576f8bec0f08d7cefc0be87244e89532c45d Mon Sep 17 00:00:00 2001 From: Louis Date: Thu, 2 Nov 2023 19:48:23 +0100 Subject: [PATCH] ci: :construction_worker: Change CI to add test files --- .DS_Store | Bin 0 -> 8196 bytes .gitea/workflows/test.yml | 5 +++++ Tests/.DS_Store | Bin 0 -> 6148 bytes Tests/Stream/StreamTest.cs | 9 ++++++++- Tests/Tests.csproj | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .DS_Store create mode 100644 Tests/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..56fdcb8795fdb43c7ac4afc634732e7dfe83fcca GIT binary patch literal 8196 zcmeI1&x_MQ6vy9m`y*u$Dkv235KzQJaogQxLA=CTVLb?9Rz+00$)wEKQn`BY|AoZSC11JN4 zft_h-6^A*E*;$`y898$vm0&ys?V7zu!_JJSp3np|0Zl*?&;&Gre}w>Evsp71T=#`l zkD7ocu#^PY`N71_)RH<9%1<3Q@GSsp7N>c`;}SbSHKkfoM?%qpjfhZG5lZA1gNSgP zH>IB?btF`T1Cg5#A~O@YLm@mnzQ4)cfmlNIs0nBSvjo`QJquT$4L&65{{7R3v@N8K zh8s{9=Zv>MF5W9XKf12ky%X)7{nWF8{8tQx{5UVPz)^FPpVRhq{-ZB@hrbVbe&szv zI;mlik5Y#?+2pVeAH3Nr&TU{7DQmih+@Nk>E$>#C}qhPEWPwai#w-YDn#dW9qh`rjOG;qhqj(gv4^_!(LH)xbNe$?vn0N-n& z%i{-rT6MWfg(l?Q{3&057=uWk)1=HTjjwPJ2=Yz>D+Lm zK^V~&tZ2Lh$V&yB60eWPmw2SCNuf>Z?0#6Wr#WBt->k{+{*=#z@FE|DZN|bhYM!Td zHwtLf#(7qI4t9`vjO^q8gnDX43iIucpVjrIi9fSWZ%g8-`1EgmzK25l_8m-+COXBM zS#{F{mWjZMSZtY{?`|%B{=ZB}^jbB6r6WMH4ZBgtWsh%|rU|gUwuyZgJ8R5uB$S8X qz_;V5d^?VM{D&bPo9N17EU6=*ID_r4KM0U_RQmeQ@#|qp3H$*nSwRy3 literal 0 HcmV?d00001 diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index eb2706c..f914297 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -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 \ No newline at end of file diff --git a/Tests/.DS_Store b/Tests/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..42451df95aa0f5aaee27ac30b951f0ea515bfef5 GIT binary patch literal 6148 zcmeHK%SyvQ6rE|SO({Ya3SADkEtozih?@}W4;ayfN=-=7V9b;zHH%WnT7Sqd@q4^? zW&#$o7P0rj%(>5*%z?~QD(3x!dVtqPv`eHnq zY&IS1==kL9a`v3Or1DME$$@Pp2L>y62gR)B)nBHGOdr8hWmj2*!~iis3=jjm&44)< ztnO~pK&vMPh=CdgaDNcc5M6_%MzwW7hu3F}w-8Z4$F~HcFz6aAH9`c0>ry~n%FPpl z>vHf5ljj;NHR^K4)yy!CnYntra5X#lg-U1K)kr-tKn!d%(A1`l=l=!#GPRHV?Gmzx z0b<~vF~D0>f9k=a%-Q;5d3e?eXb;d(Ft0=f1oW*-02sKB^i)vC1?rIJ8Z0&9DCk$^ PfOHX1giuEe`~m}C)pAK+ literal 0 HcmV?d00001 diff --git a/Tests/Stream/StreamTest.cs b/Tests/Stream/StreamTest.cs index 0139eea..89f7157 100644 --- a/Tests/Stream/StreamTest.cs +++ b/Tests/Stream/StreamTest.cs @@ -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)); + } } \ No newline at end of file diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 9b7e8f8..b5eb8f8 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -24,6 +24,7 @@ +