Name: "fake-stack-name", } applicationRequirement.GetApplicationReturns(getApplicationModel) appSummaryRepo.GetSummaryReturns(getAppSummaryModel, getAppSummaryErr) appInstancesRepo.GetInstancesReturns(appInstanceFields, nil) stackRepo.FindByGUIDReturns(appStackModel, nil) }) JustBeforeEach(func() { err = cmd.Execute(flagContext) }) It("gets the application summary", func() { Expect(err).NotTo(HaveOccurred()) Expect(appSummaryRepo.GetSummaryCallCount()).To(Equal(1)) }) It("gets the app instances", func() { Expect(err).NotTo(HaveOccurred()) Expect(appInstancesRepo.GetInstancesCallCount()).To(Equal(1)) }) It("gets the application from the application requirement", func() { Expect(err).NotTo(HaveOccurred()) Expect(applicationRequirement.GetApplicationCallCount()).To(Equal(1)) }) It("gets the stack name from the stack repository", func() { Expect(err).NotTo(HaveOccurred()) Expect(stackRepo.FindByGUIDCallCount()).To(Equal(1))