vendredi 29 septembre 2017

NancyFx testing: The type or namespace Bootstrapper cannot be found

I'm just working with Nancyfx in C#, but i'm just restart to work in last week on c# and probably i'm missing a lot of concept related to dot.net and c#, will study about those in this weekend

Trying to create some test for a nancy module (i use Nunit and helper test class of NancyFx) i have the problem that those tests have to use the Path of the project for which i write the test for(that is for example i write those test in TestProject and i'm testing SelfHostNancyProject). So to resolve this problem definitively (actually i manually copied the Views directory of project SelfHostNancyProject in the Views directory of TestProject. But copying around those dir/files even with an automatically post-build command is not the best way.

I discover this solution http://ift.tt/2xC4BRJ but copying the code of class TestingRootPathProvider inside my code i have the error

The type or namespace Bootstrapper cannot be found

But hanging around with google i can't find a solution. I see that seems something related to app inizialization What are Bootstrappers/Bootstrapping in C#

But in any case i don't understand which import i have to do (if any) to resolve the problem or may be there is something i'm missing.

Aucun commentaire:

Enregistrer un commentaire