Skip to content

Commit

Permalink
FileConventions.Test: add test
Browse files Browse the repository at this point in the history
Add test for DetectUnpinnedDotnetToolInstallVersions function.
  • Loading branch information
tehraninasab committed Jul 6, 2023
1 parent 8b38178 commit 283602c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI

on: [push, pull_request]

jobs:
build:
name: Build
runs-on: ubuntu-22.04
container:
image: "ubuntu:22.04"
steps:
- name: Install fantomless-tool
run: |
dotnet tool install fantomless-tool --version 4.8.999
- name: Print "Hello World!"
run: echo "Hello World"
15 changes: 15 additions & 0 deletions src/FileConventions.Test/FileConventions.Test.fs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,21 @@ let DetectUnpinnedDotnetToolInstallVersions1() =
Is.EqualTo true
)

[<Test>]
let DetectUnpinnedDotnetToolInstallVersions2() =
let fileInfo =
(FileInfo(
Path.Combine(
dummyFilesDirectory.FullName,
"DummyCIWithoutUnpinnedDotnetToolInstallVersion.yml"
)
))

Assert.That(
DetectUnpinnedDotnetToolInstallVersions fileInfo,
Is.EqualTo false
)


[<Test>]
let DetectAsteriskInPackageReferenceItems1() =
Expand Down

0 comments on commit 283602c

Please sign in to comment.