public void SetUp()
        {
            var application = new ApplicationBuilder().WithName("Test Application").Build();

            Configuration.FeatureResolver = new HttpFeatureResolver("http://localhost:12345");
            Runner.SqlCompact("Lemonade").Down();
            Runner.SqlCompact("Lemonade").Up();
            _getFeature = new GetFeatureByNameAndApplication();
            _createFeature = new CreateFeatureFake();
            _createApplication = new CreateApplicationFake();
            _getApplicationByName = new GetApplicationByName();
            _createApplication.Execute(application);
            application = _getApplicationByName.Execute(application.Name);

            var feature1 = new FeatureBuilder().WithName("MySuperDuperFeature")
                .WithApplication(application)
                .WithIsEnabled(true)
                .Build();

            var feature2 = new FeatureBuilder().WithName("Ponies")
                .WithApplication(application)
                .WithIsEnabled(true)
                .Build();

            _createFeature.Execute(feature1);
            _createFeature.Execute(feature2);

            new CreateFeatureOverrideFake().Execute(new Data.Entities.FeatureOverride { FeatureId = feature2.FeatureId, Hostname = Dns.GetHostName(), IsEnabled = true });
            _nancyHost = new NancyHost(new Uri("http://localhost:12345"), new LemonadeBootstrapper());
            _nancyHost.Start();
        }
 public void SetUp()
 {
     _createFeature = new CreateFeatureFake();
     _createApplication = new CreateApplicationFake();
     _deleteApplication = new DeleteApplication();
     _getApplicationByName = new GetApplicationByName();
     Runner.SqlCompact("Lemonade").Down();
     Runner.SqlCompact("Lemonade").Up();
 }
Exemple #3
0
 public CreateApplicationCommandHandler(IDomainEventDispatcher eventDispatcher, ICreateApplication createApplication)
 {
     _eventDispatcher   = eventDispatcher;
     _createApplication = createApplication;
 }