@@ -36,55 +36,51 @@ module StubberyCE =
3636 stubbery
3737 .Request( methods)
3838 .IfRoute( route)
39- .Response( fun r args -> stub r args |> box) |> ignore
39+ .Response( fun r args -> stub r args |> box)
40+ |> ignore
41+
4042 this
4143
4244 [<CustomOperation( " stub_obj" ) >]
43- member this.StubObj ( x , methods , route , stub : unit -> obj ) =
44- this.Stub( x, methods, route, fun _ _ -> stub( ))
45+ member this.StubObj ( x , methods , route , stub : unit -> obj ) =
46+ this.Stub( x, methods, route, ( fun _ _ -> stub () ))
4547
4648 [<CustomOperation( " GET" ) >]
4749 member this.Get ( x , route , stub ) =
48- this.Stub( x, [| HttpMethod.Get|], route, stub)
50+ this.Stub( x, [| HttpMethod.Get |], route, stub)
4951
5052 [<CustomOperation( " GET_OBJ" ) >]
5153 member this.GetObj ( x , route , stub ) =
52- this.StubObj( x, [| HttpMethod.Get|], route, fun _ -> stub)
54+ this.StubObj( x, [| HttpMethod.Get |], route, ( fun _ -> stub) )
5355
5456 [<CustomOperation( " POST" ) >]
5557 member this.Post ( x , route , stub ) =
56- this.Stub( x, [| HttpMethod.Post|], route, stub)
58+ this.Stub( x, [| HttpMethod.Post |], route, stub)
5759
5860 [<CustomOperation( " POST_OBJ" ) >]
5961 member this.PostObj ( x , route , stub ) =
60- this.StubObj( x, [| HttpMethod.Post|], route, fun _ -> stub)
62+ this.StubObj( x, [| HttpMethod.Post |], route, ( fun _ -> stub) )
6163
6264 [<CustomOperation( " PUT" ) >]
6365 member this.Put ( x , route , stub ) =
64- this.Stub( x, [| HttpMethod.Put|], route, stub)
66+ this.Stub( x, [| HttpMethod.Put |], route, stub)
6567
6668 [<CustomOperation( " DELETE" ) >]
6769 member this.Delete ( x , route , stub ) =
68- this.Stub( x, [| HttpMethod.Delete|], route, stub)
70+ this.Stub( x, [| HttpMethod.Delete |], route, stub)
6971
7072 member this.GetFactory () =
7173 let clientBuilder =
7274 factory
7375 |> web_ configure_ services ( fun s ->
7476 s.ConfigureAll< HttpClientFactoryOptions>( fun options ->
75- options.HttpClientActions.Add( fun c ->
76- c.BaseAddress <- uri.MockUri
77- )
78- )
79- )
77+ options.HttpClientActions.Add( fun c -> c.BaseAddress <- uri.MockUri)))
8078
8179 stubbery.Start()
8280 uri.MockUri <- new Uri( stubbery.Address)
8381 clientBuilder
8482
85- interface IDisposable
86- with member this.Dispose () =
87- factory.Dispose()
88- stubbery.Dispose()
89-
90-
83+ interface IDisposable with
84+ member this.Dispose () =
85+ factory.Dispose()
86+ stubbery.Dispose()
0 commit comments