當前位置: 首頁>>代碼示例>>Golang>>正文


Golang gauge_messages.ProtoConcept類代碼示例

本文整理匯總了Golang中github.com/getgauge/gauge/gauge_messages.ProtoConcept的典型用法代碼示例。如果您正苦於以下問題:Golang ProtoConcept類的具體用法?Golang ProtoConcept怎麽用?Golang ProtoConcept使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ProtoConcept類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: setExecutionResultForConcept

func (executor *specExecutor) setExecutionResultForConcept(protoConcept *gauge_messages.ProtoConcept) {
	var conceptExecutionTime int64
	for _, step := range protoConcept.GetSteps() {
		if step.GetItemType() == gauge_messages.ProtoItem_Concept {
			stepExecResult := step.GetConcept().GetConceptExecutionResult().GetExecutionResult()
			conceptExecutionTime += stepExecResult.GetExecutionTime()
			if step.GetConcept().GetConceptExecutionResult().GetExecutionResult().GetFailed() {
				conceptExecutionResult := &gauge_messages.ProtoStepExecutionResult{ExecutionResult: step.GetConcept().GetConceptExecutionResult().GetExecutionResult(), Skipped: proto.Bool(false)}
				conceptExecutionResult.ExecutionResult.ExecutionTime = proto.Int64(conceptExecutionTime)
				protoConcept.ConceptExecutionResult = conceptExecutionResult
				protoConcept.ConceptStep.StepExecutionResult = conceptExecutionResult
				return
			}
		} else if step.GetItemType() == gauge_messages.ProtoItem_Step {
			stepExecResult := step.GetStep().GetStepExecutionResult().GetExecutionResult()
			conceptExecutionTime += stepExecResult.GetExecutionTime()
			if stepExecResult.GetFailed() {
				conceptExecutionResult := &gauge_messages.ProtoStepExecutionResult{ExecutionResult: stepExecResult, Skipped: proto.Bool(false)}
				conceptExecutionResult.ExecutionResult.ExecutionTime = proto.Int64(conceptExecutionTime)
				protoConcept.ConceptExecutionResult = conceptExecutionResult
				protoConcept.ConceptStep.StepExecutionResult = conceptExecutionResult
				return
			}
		}
	}
	protoConcept.ConceptExecutionResult = &gauge_messages.ProtoStepExecutionResult{ExecutionResult: &gauge_messages.ProtoExecutionResult{Failed: proto.Bool(false), ExecutionTime: proto.Int64(conceptExecutionTime)}}
	protoConcept.ConceptStep.StepExecutionResult = protoConcept.ConceptExecutionResult
	protoConcept.ConceptStep.StepExecutionResult.Skipped = proto.Bool(false)
}
開發者ID:andrewmkrug,項目名稱:gauge,代碼行數:29,代碼來源:specExecutor.go

示例2: checkConceptParameterValuesInOrder

func checkConceptParameterValuesInOrder(c *C, concept *gauge_messages.ProtoConcept, paramValues ...string) {
	params := getParameters(concept.GetConceptStep().Fragments)
	c.Assert(len(params), Equals, len(paramValues))
	for i, param := range params {
		c.Assert(param.GetValue(), Equals, paramValues[i])
	}

}
開發者ID:adiferd,項目名稱:gauge,代碼行數:8,代碼來源:specExecutor_test.go

示例3: executeConcept

func (executor *specExecutor) executeConcept(protoConcept *gauge_messages.ProtoConcept) bool {
	executor.logger.Info("Executing Concept: %s", formatter.FormatConcept(protoConcept))
	for _, step := range protoConcept.Steps {
		failure := executor.executeItem(step)
		executor.setExecutionResultForConcept(protoConcept)
		if failure {
			return true
		}
	}
	return protoConcept.GetConceptExecutionResult().GetExecutionResult().GetFailed()
}
開發者ID:krwhitney,項目名稱:gauge,代碼行數:11,代碼來源:specExecutor.go

示例4: executeConcept

func (executor *specExecutor) executeConcept(protoConcept *gauge_messages.ProtoConcept) bool {
	executor.writer.ConceptStarting(protoConcept)
	for _, step := range protoConcept.Steps {
		failure := executor.executeItem(step)
		executor.setExecutionResultForConcept(protoConcept)
		if failure {
			return true
		}
	}
	executor.writer.ConceptFinished(protoConcept)
	return protoConcept.GetConceptExecutionResult().GetExecutionResult().GetFailed()
}
開發者ID:ranjeet-floyd,項目名稱:gauge,代碼行數:12,代碼來源:specExecutor.go

示例5: executeConcept

func (executor *specExecutor) executeConcept(protoConcept *gauge_messages.ProtoConcept) bool {
	executor.consoleReporter.ConceptStart(formatter.FormatConcept(protoConcept))
	for _, step := range protoConcept.Steps {
		failure := executor.executeItem(step)
		executor.setExecutionResultForConcept(protoConcept)
		if failure {
			return true
		}
	}
	conceptFailed := protoConcept.GetConceptExecutionResult().GetExecutionResult().GetFailed()
	executor.consoleReporter.ConceptEnd(conceptFailed)
	return conceptFailed
}
開發者ID:andrewmkrug,項目名稱:gauge,代碼行數:13,代碼來源:specExecutor.go

示例6: executeConcept

func (e *scenarioExecutor) executeConcept(protoConcept *gauge_messages.ProtoConcept) *gauge_messages.ProtoStepExecutionResult {
	e.consoleReporter.ConceptStart(formatter.FormatConcept(protoConcept))
	for _, step := range protoConcept.Steps {
		res := e.executeItem(step)
		e.setExecutionResultForConcept(protoConcept)
		if res.GetExecutionResult().GetFailed() {
			return protoConcept.GetConceptExecutionResult()
		}
	}
	conceptFailed := protoConcept.GetConceptExecutionResult().GetExecutionResult().GetFailed()
	e.consoleReporter.ConceptEnd(conceptFailed)
	return protoConcept.GetConceptExecutionResult()
}
開發者ID:mattdotmatt,項目名稱:gauge,代碼行數:13,代碼來源:scenarioExecutor.go


注:本文中的github.com/getgauge/gauge/gauge_messages.ProtoConcept類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。