Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Commit

Permalink
Tests for add above and add below (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
kragt authored and Krzysztof-Cieslak committed Oct 25, 2017
1 parent a2280dc commit 8f16859
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions tests/Forge.Tests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,22 @@ let tests =
let files = pf'.SourceFiles.AllFiles()
Expect.equal (files |> Seq.head) "App.config" "should be same"
files |> Expect.hasLength 3

testCase "parse - add above" <| fun _ ->
let pf = FsProject.parse astInput
let f = {SourceFile.Include = "above.fs"; Condition = None; OnBuild = BuildAction.Compile; Link = None; Copy = None; Paket = None}
let pf' = FsProject.addAbove "FixProject.fs" f pf
let files = pf'.SourceFiles.AllFiles()
Expect.equal (files |> Seq.head) "above.fs" "should be same"
pf'.SourceFiles.AllFiles() |> Expect.hasLength 4

testCase "parse - add below" <| fun _ ->
let pf = FsProject.parse astInput
let f = {SourceFile.Include = "below.fs"; Condition = None; OnBuild = BuildAction.Compile; Link = None; Copy = None; Paket = None}
let pf' = FsProject.addBelow "FixProject.fs" f pf
let files = pf'.SourceFiles.AllFiles()
Expect.equal (files |> Seq.item 1) "below.fs" "should be same"
pf'.SourceFiles.AllFiles() |> Expect.hasLength 4
]

testList "SolutionSystem" [
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCoverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* [x] Parse - remove non-existing reference
* [x] Parse - move up
* [x] Parse - move down
* [ ] Parse - add above (?)
* [ ] Parse - add below (?)
* [x] Parse - add above (?)
* [x] Parse - add below (?)
* [ ] Parse - add dir
* [ ] Parse - remove dir
* [x] Parse - rename file
Expand Down

0 comments on commit 8f16859

Please sign in to comment.