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'm working on a new Aspire feature that I hope will be accepted as a Pull Request by the Aspire team.
(See an explanation and my progress here, if interested: #4785)
However, I'm struggling with my unit tests. I'm trying to use the CreateAsync method of the DistributedApplicationTestingBuilder to get a mock distributed application
var distributedApplicationBuilder = await DistributedApplicationTestingBuilder.CreateAsync<BlazorFluentUI_AppHost>();
It was working fine in my own test project in my own solution, where I was passing the type of a recently created AppHost project as the value of T. However, when I copied my unit tests into the Aspire solution (\tests\Aspire.Hosting.Tests) some of them started failing. I tried various values of T, including TestingAppHost1_AppHost (which is a distributed application host project already referenced by the Aspire.Hosting.Tests project.
In all cases above, I got the message:
System.InvalidOperationException : The entry point exited without building a DistributedApplication.
Please could you tell me what class I can use to bootstrap DistributedApplicationTestingBuilder to use in my unit tests?
Thanks for your help!
Benjamin
The text was updated successfully, but these errors were encountered:
I'm working on a new Aspire feature that I hope will be accepted as a Pull Request by the Aspire team.
(See an explanation and my progress here, if interested: #4785)
However, I'm struggling with my unit tests. I'm trying to use the
CreateAsync
method of theDistributedApplicationTestingBuilder
to get a mock distributed applicationIt was working fine in my own test project in my own solution, where I was passing the type of a recently created AppHost project as the value of
T
. However, when I copied my unit tests into the Aspire solution (\tests\Aspire.Hosting.Tests) some of them started failing. I tried various values ofT
, includingTestingAppHost1_AppHost
(which is a distributed application host project already referenced by the Aspire.Hosting.Tests project.In all cases above, I got the message:
System.InvalidOperationException : The entry point exited without building a DistributedApplication.
Please could you tell me what class I can use to bootstrap
DistributedApplicationTestingBuilder
to use in my unit tests?Thanks for your help!
Benjamin
The text was updated successfully, but these errors were encountered: