Esempio n. 1
0
			dependentStepFactory *execfakes.FakeStepFactory
			dependentStep        *execfakes.FakeStep
		)

		BeforeEach(func() {
			taskStepFactory = new(execfakes.FakeStepFactory)
			taskStep = new(execfakes.FakeStep)
			taskStep.ResultStub = successResult(true)
			taskStepFactory.UsingReturns(taskStep)
			fakeFactory.TaskReturns(taskStepFactory)

			inputStepFactory = new(execfakes.FakeStepFactory)
			inputStep = new(execfakes.FakeStep)
			inputStep.ResultStub = successResult(true)
			inputStepFactory.UsingReturns(inputStep)
			fakeFactory.GetReturns(inputStepFactory)

			outputStepFactory = new(execfakes.FakeStepFactory)
			outputStep = new(execfakes.FakeStep)
			outputStep.ResultStub = successResult(true)
			outputStepFactory.UsingReturns(outputStep)
			fakeFactory.PutReturns(outputStepFactory)

			dependentStepFactory = new(execfakes.FakeStepFactory)
			dependentStep = new(execfakes.FakeStep)
			dependentStep.ResultStub = successResult(true)
			dependentStepFactory.UsingReturns(dependentStep)
			fakeFactory.DependentGetReturns(dependentStepFactory)

			taskStep.RunReturns(nil)
			inputStep.RunReturns(nil)
Esempio n. 2
0
			var (
				getStepFactory *execfakes.FakeStepFactory
				getStep        *execfakes.FakeStep

				fakeDelegate    *fakes.FakeBuildDelegate
				fakeGetDelegate *execfakes.FakeGetDelegate

				plan atc.Plan
			)

			BeforeEach(func() {
				getStepFactory = new(execfakes.FakeStepFactory)
				getStep = new(execfakes.FakeStep)
				getStep.ResultStub = successResult(true)
				getStepFactory.UsingReturns(getStep)
				fakeFactory.GetReturns(getStepFactory)

				fakeDelegate = new(fakes.FakeBuildDelegate)
				fakeDelegateFactory.DelegateReturns(fakeDelegate)

				fakeGetDelegate = new(execfakes.FakeGetDelegate)
				fakeDelegate.InputDelegateReturns(fakeGetDelegate)

				plan = atc.Plan{
					Location: nil,
					Get: &atc.GetPlan{
						Name: "some input",
					},
				}
			})