func (specInfoGatherer *SpecInfoGatherer) createConceptInfos() []*gauge_messages.ConceptInfo { conceptInfos := make([]*gauge_messages.ConceptInfo, 0) for _, concept := range specInfoGatherer.getDictionary().ConceptsMap { stepValue := parser.CreateStepValue(concept.ConceptStep) conceptInfos = append(conceptInfos, &gauge_messages.ConceptInfo{StepValue: parser.ConvertToProtoStepValue(&stepValue), Filepath: proto.String(concept.FileName), LineNumber: proto.Int(concept.ConceptStep.LineNo)}) } return conceptInfos }
func (s *SpecInfoGatherer) getStepsFromConcept(concept *gauge.Concept) []*gauge.StepValue { stepValues := make([]*gauge.StepValue, 0) for _, step := range concept.ConceptStep.ConceptSteps { if !step.IsConcept { stepValue := parser.CreateStepValue(step) stepValues = append(stepValues, &stepValue) } } return stepValues }
func getParsedStepValues(steps []*gauge.Step) []*gauge.StepValue { var stepValues []*gauge.StepValue for _, step := range steps { if !step.IsConcept { stepValue := parser.CreateStepValue(step) stepValues = append(stepValues, &stepValue) } } return stepValues }
func (s *SpecInfoGatherer) getStepsFromSpec(spec *gauge.Specification) []*gauge.StepValue { stepValues := make([]*gauge.StepValue, 0) for _, scenario := range spec.Scenarios { for _, step := range scenario.Steps { if !step.IsConcept { stepValue := parser.CreateStepValue(step) stepValues = append(stepValues, &stepValue) } } } return stepValues }
func (s *SpecInfoGatherer) GetConceptInfos() []*gauge_messages.ConceptInfo { conceptInfos := make([]*gauge_messages.ConceptInfo, 0) s.mutex.Lock() for _, conceptList := range s.conceptsCache { for _, concept := range conceptList { stepValue := parser.CreateStepValue(concept.ConceptStep) conceptInfos = append(conceptInfos, &gauge_messages.ConceptInfo{StepValue: parser.ConvertToProtoStepValue(&stepValue), Filepath: proto.String(concept.FileName), LineNumber: proto.Int(concept.ConceptStep.LineNo)}) } } s.mutex.Unlock() return conceptInfos }
func (specInfoGatherer *SpecInfoGatherer) updateAllStepsList() { specInfoGatherer.availableStepsMap = make(map[string]*parser.StepValue, 0) specInfoGatherer.addStepValuesToAvailableSteps(specInfoGatherer.runnerStepValues) for _, steps := range specInfoGatherer.fileToStepsMap { for _, step := range steps { if step.IsConcept { continue } stepValue := parser.CreateStepValue(step) if _, ok := specInfoGatherer.availableStepsMap[stepValue.StepValue]; !ok { specInfoGatherer.availableStepsMap[stepValue.StepValue] = &stepValue } } } }