-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ronald Schlenker
committed
Sep 28, 2018
1 parent
55ce218
commit 5e538b2
Showing
7 changed files
with
184 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="Tests.fs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" /> | ||
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" /> | ||
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\FsHttp\FsHttp.fsproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
module ``Tests for FsHttp`` | ||
|
||
open System | ||
open Microsoft.VisualStudio.TestTools.UnitTesting | ||
|
||
open FsHttp | ||
|
||
[<TestMethod>] | ||
let ``Synchronous GET call is invoked immediately`` = | ||
http { GET @"https://reqres.in/api/users?page=2&delay=3" | ||
} | ||
|> toJson | ||
//>>> async { | ||
// return 4 | ||
//} | ||
//>> send | ||
|
||
|
||
|
||
// http { GET @"http://www.google.com" | ||
// AcceptLanguage "de-DE" | ||
// } | ||
// |> send | ||
|
||
|
||
// http { POST @"https://reqres.in/api/users" | ||
// CacheControl "no-cache" | ||
|
||
// body | ||
// json """ | ||
// { | ||
// "name": "morpheus", | ||
// "job": "leader" | ||
// } | ||
// """ | ||
// } | ||
// |> send | ||
|
||
// http { GET "https://reqres.in/api/users" | ||
// } | ||
// |> send | ||
// |> toJson | ||
// |> test | ||
// >>= byExample IgnoreIndexes Subset | ||
// """ | ||
// { | ||
// "page": 1, | ||
// "data": [ | ||
// { "id": 1 } | ||
// ] | ||
// } | ||
// """ | ||
// >>= expect *> fun json -> json?Data.AsArray() |> should haveLength 2 | ||
// |> eval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.