public PackagesNancyModuleTest() { packageRepo = new Mock <IPackageService>(MockBehavior.Strict); var bootstrapper = new TestBootstrapper(typeof(PackagesNancyModule), b => { b.RegisterInstance(packageRepo.Object).As <IPackageService>(); }); this.browser = new Browser(bootstrapper, ctx => { ctx.HostName("testhost"); ctx.Accept(new MediaRange("application/atom+xml")); //TODO test with others }); }
public PackagesNancyModuleIntegrationTest() { tmpDir = new TemporaryDirectory(); config = new ServerPackageRepositoryConfig() { // defaults from original impl EnableDelisting = false, EnableFrameworkFiltering = false, EnableFileSystemMonitoring = true, IgnoreSymbolsPackages = false, AllowOverrideExistingPackageOnPush = true, RunBackgroundTasks = false, RootPath = tmpDir.Path }; var bootstrapper = new TestBootstrapper(typeof(PackagesNancyModule), b => { b.RegisterModule(new NuGetServerAutofacModule(config)); }); this.browser = new Browser(bootstrapper, ctx => { ctx.HostName("testhost"); ctx.Accept(new MediaRange("application/atom+xml")); //TODO test with others }); }