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

Commit

Permalink
Added integration tests
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 c898d8a commit a2280dc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/Forge.IntegrationTests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ let tests =
|> initTest dir
let project = dir </> "src" </> "Sample" </> "Sample.fsproj" |> loadProject
project |> Expect.hasFile "Test.fs"

testCase "Create new file with copy-to-output" <| fun _ ->
let dir = "new_file - copy"
["new project -n Sample --dir src -t console --no-paket"
"new file -n src/Sample/Test --project src/Sample/Sample.fsproj --template fs --copy-to-output never"
]
|> initTest dir
let project = dir </> "src" </> "Sample" </> "Sample.fsproj" |> loadProject
project |> Expect.hasFile "Test.fs"
]
testList "References" [
testCase "Add Reference" <| fun _ ->
Expand Down Expand Up @@ -168,6 +177,16 @@ let tests =
|> initTest dir
let project = dir </> "src" </> "Sample" </> "Sample.fsproj" |> loadProject
project |> Expect.hasFile "Test.fs"

testCase "Add File - with project, absolute path, copy-to-output" <| fun _ ->
let dir = "file_add_file_project_absolute_path_copy" |> makeAbsolute
let p = dir </> "src" </> "Sample" </> "Test.fs"
let projectPath = dir </> "src" </> "Sample" </> "Sample.fsproj"
[ "new project -n Sample --dir src -t console --no-paket"
sprintf "add file -p %s -n %s --copy-to-output always" projectPath p ]
|> initTest dir
let project = dir </> "src" </> "Sample" </> "Sample.fsproj" |> loadProject
project |> Expect.hasFile "Test.fs"
]
testList "Remove file" [
testCase "Remove File" <| fun _ ->
Expand Down

0 comments on commit a2280dc

Please sign in to comment.