func (m *Match) PutValue(tc *TestCase, ctx *Context) bool {
	switch m.GetType() {
	case BodyJSONPresent:
		success, err := m.setContextFromBodyPresent(tc, ctx)
		if err != nil {
			m.AppMsg(err.Error())
			return false
		}
		return success
	case BodyJSONValue:
		success, err := m.setContextFromCheckBodyJSONValue(tc, ctx)
		if err != nil {
			return false
		}
		return success
	case Authorisation:
		if strings.EqualFold("bearer", m.Authorisation) {
			success, err := checkAuthorisation(m, tc)
			if err != nil {
				return false
			}
			ctx.Put(m.ContextName, m.Result)
			return success
		}
	case HeaderRegexContext:
		success, err := checkHeaderRegexContext(m, tc)
		if err != nil {
			return false
		}
		if success {
			ctx.Put(m.ContextName, m.Result)
			return true
		}
	case BodyRegex:
		return handleBodyRegex(tc, m, ctx)
	}
	return false
}
// PutValue puts the value from the json match along with a context variable to put it into
PutValue puts the value from the json match along with a context variable to put it into
// PutValue puts the value from the json match along with a context variable to put it into
func (m *Match) PutValue(tc *TestCase, ctx *Context) bool {
	switch m.GetType() {
	case BodyJSONPresent:
		success, err := m.setContextFromBodyPresent(tc, ctx)
		if err != nil {
			m.AppMsg(err.Error())
			return false
		}
		return success
	case BodyJSONValue:
		success, err := m.setContextFromCheckBodyJSONValue(tc, ctx)
		if err != nil {
			return false
		}
		return success
	case Authorisation:
		if strings.EqualFold("bearer", m.Authorisation) {
			success, err := checkAuthorisation(m, tc)
			if err != nil {
				return false
			}
			ctx.Put(m.ContextName, m.Result)
			return success
		}
	case HeaderRegexContext:
		success, err := checkHeaderRegexContext(m, tc)
		if err != nil {
			return false
		}
		if success {
			ctx.Put(m.ContextName, m.Result)
			return true
		}
	case BodyRegex:
		return handleBodyRegex(tc, m, ctx)
	}
	return false
}
func ( m * Match ) PutValue ( tc * TestCase , ctx * Context ) bool { switch m . GetType ( ) { case BodyJSONPresent : success , err := m . setContextFromBodyPresent ( tc , ctx ) if err != nil { m . AppMsg ( err . Error ( ) ) return false } return success case BodyJSONValue : success , err := m . setContextFromCheckBodyJSONValue ( tc , ctx ) if err != nil { return false } return success case Authorisation : if strings . EqualFold ( " " , m . Authorisation ) { success , err := checkAuthorisation ( m , tc ) if err != nil { return false } ctx . Put ( m . ContextName , m . Result ) return success } case HeaderRegexContext : success , err := checkHeaderRegexContext ( m , tc ) if err != nil { return false } if success { ctx . Put ( m . ContextName , m . Result ) return true } case BodyRegex : return handleBodyRegex ( tc , m , ctx ) } return false }
PutValue puts the value from the json match along with a context variable to put it into
PutValue puts the value from the json match along with a context variable to put it into