Ejemplo n.º 1
0
		wordGenerator              *testwords.FakeWordGenerator
		requirementsFactory        *testreq.FakeReqFactory
		authRepo                   *testapi.FakeAuthenticationRepository
		actor                      *fakeactors.FakePushActor
		app_files                  *fakeappfiles.FakeAppFiles
		zipper                     *fakeappfiles.FakeZipper
		OriginalCommandStart       command_registry.Command
		OriginalCommandStop        command_registry.Command
		OriginalCommandServiceBind command_registry.Command
		deps                       command_registry.Dependency
	)

	updateCommandDependency := func(pluginCall bool) {
		deps.Ui = ui
		deps.Config = configRepo
		deps.ManifestRepo = manifestRepo
		deps.RepoLocator = deps.RepoLocator.SetApplicationRepository(appRepo)
		deps.RepoLocator = deps.RepoLocator.SetDomainRepository(domainRepo)
		deps.RepoLocator = deps.RepoLocator.SetRouteRepository(routeRepo)
		deps.RepoLocator = deps.RepoLocator.SetServiceRepository(serviceRepo)
		deps.RepoLocator = deps.RepoLocator.SetStackRepository(stackRepo)
		deps.RepoLocator = deps.RepoLocator.SetAuthenticationRepository(authRepo)
		deps.WordGenerator = wordGenerator
		deps.PushActor = actor
		deps.AppZipper = zipper
		deps.AppFiles = app_files

		//inject fake commands dependencies into registry
		command_registry.Register(starter)
		command_registry.Register(stopper)
		command_registry.Register(serviceBinder)