You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add some integration tests for my exploratory Falco app. In particular, I'd like to check the responses returned from the HttpHandlers. I found this blog post useful, but am struggling with configuring the TestHost. My test currently reads:
openMicrosoft.AspNetCore.HostingopenNUnit.FrameworkopenFsUnitopenMicrosoft.AspNetCore.TestHostmodule``SkeletonTests`` =[<Test>]let``Ensure NUnit and FsUnit are installed and working correctly`` ()=letbuilder:IWebHostBuilder = WebHostBuilder()
.ConfigureServices(FalcoFood.Program.configureServices)
.Configure(Action<IApplicationBuilder> FalcoFood.Program.configureApp)letserver=new TestServer(builder)letclient= server.CreateClient()//...
For that to work, I need configureServices and configureApp functions in my app. As a dotnet & F# newbie, I'm struggling with what those should look like. The blog post uses Giraffe and it uses a different approach to configuration compared to Falco (I think).
My app doesn't inject any services and so I'm not sure what the configureServices / configureApp functions need to look like.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all
I want to add some integration tests for my exploratory Falco app. In particular, I'd like to check the responses returned from the HttpHandlers. I found this blog post useful, but am struggling with configuring the TestHost. My test currently reads:
For that to work, I need
configureServices
andconfigureApp
functions in my app. As a dotnet & F# newbie, I'm struggling with what those should look like. The blog post uses Giraffe and it uses a different approach to configuration compared to Falco (I think).My app doesn't inject any services and so I'm not sure what the
configureServices
/configureApp
functions need to look like.Any pointers appreciated. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions