func (t *TestCase) ProcessReplacementFields(ctx *Context, showReplacementErrors bool) {
	var err error
	logger := logrus.StandardLogger()

	t.Input.Endpoint, err = replaceContextField(t.Input.Endpoint, ctx) // errors if field not present in context - which is isReplacement for this function
	if err != nil {
		t.logReplaceError("Endpoint", err, logger, showReplacementErrors)
	}

	t.Input.RequestBody, err = replaceContextField(t.Input.RequestBody, ctx)
	if err != nil {
		t.logReplaceError("RequestBody", err, logger, showReplacementErrors)
	}

	t.processReplacementFormData(ctx)
	t.processReplacementHeaders(ctx, logger, showReplacementErrors)
	t.processReplacementClaims(ctx)

	// If customer ip value is not set, remove it from headers
	customerIP, err := ctx.GetString("x-fapi-customer-ip-address")
	if err == nil && customerIP == "" {
		delete(t.Input.Headers, "x-fapi-customer-ip-address")
	}

	for k := range t.Context {
		param, ok := t.Context[k].(string)
		if !ok {
			continue
		}
		t.Context[k], err = replaceContextField(param, ctx)
		if err != nil {
			t.logReplaceError("param", err, logger, showReplacementErrors)
		}
	}

	for k, v := range t.Expect.ContextPut.Matches {
		t.Expect.ContextPut.Matches[k].ContextName, err = replaceContextField(v.ContextName, ctx)
		if err != nil {
			t.logReplaceError("ContextName", err, logger, showReplacementErrors)
		}
	}

	for idx, match := range t.Expect.Matches {
		match.ProcessReplacementFields(ctx)
		t.Expect.Matches[idx] = match
	}
}
// ProcessReplacementFields prefixed by '$' in the testcase Input and Context sections
// Call to pre-process custom test cases from discovery model
ProcessReplacementFields prefixed by '$' in the testcase Input and Context sections
Call to pre-process custom test cases from discovery model
// ProcessReplacementFields prefixed by ' $ ' in the testcase Input and Context sections // Call to pre - process custom test cases from discovery model
func (t *TestCase) ProcessReplacementFields(ctx *Context, showReplacementErrors bool) {
	var err error
	logger := logrus.StandardLogger()
	t.Input.Endpoint, err = replaceContextField(t.Input.Endpoint, ctx) 
	if err != nil {
		t.logReplaceError("Endpoint", err, logger, showReplacementErrors)
	}
	t.Input.RequestBody, err = replaceContextField(t.Input.RequestBody, ctx)
	if err != nil {
		t.logReplaceError("RequestBody", err, logger, showReplacementErrors)
	}
	t.processReplacementFormData(ctx)
	t.processReplacementHeaders(ctx, logger, showReplacementErrors)
	t.processReplacementClaims(ctx)
	customerIP, err := ctx.GetString("x-fapi-customer-ip-address")
	if err == nil && customerIP == "" {
		delete(t.Input.Headers, "x-fapi-customer-ip-address")
	}
	for k := range t.Context {
		param, ok := t.Context[k].(string)
		if !ok {
			continue
		}
		t.Context[k], err = replaceContextField(param, ctx)
		if err != nil {
			t.logReplaceError("param", err, logger, showReplacementErrors)
		}
	}
	for k, v := range t.Expect.ContextPut.Matches {
		t.Expect.ContextPut.Matches[k].ContextName, err = replaceContextField(v.ContextName, ctx)
		if err != nil {
			t.logReplaceError("ContextName", err, logger, showReplacementErrors)
		}
	}
	for idx, match := range t.Expect.Matches {
		match.ProcessReplacementFields(ctx)
		t.Expect.Matches[idx] = match
	}
}
func ( t * TestCase ) ProcessReplacementFields ( ctx * Context , showReplacementErrors bool ) { var err error logger := logrus . StandardLogger ( ) t . Input . Endpoint , err = replaceContextField ( t . Input . Endpoint , ctx ) if err != nil { t . logReplaceError ( " " , err , logger , showReplacementErrors ) } t . Input . RequestBody , err = replaceContextField ( t . Input . RequestBody , ctx ) if err != nil { t . logReplaceError ( " " , err , logger , showReplacementErrors ) } t . processReplacementFormData ( ctx ) t . processReplacementHeaders ( ctx , logger , showReplacementErrors ) t . processReplacementClaims ( ctx ) customerIP , err := ctx . GetString ( " " ) if err == nil && customerIP == " " { delete ( t . Input . Headers , " " ) } for k := range t . Context { param , ok := t . Context [ k ] . ( string ) if ! ok { continue } t . Context [ k ] , err = replaceContextField ( param , ctx ) if err != nil { t . logReplaceError ( " " , err , logger , showReplacementErrors ) } } for k , v := range t . Expect . ContextPut . Matches { t . Expect . ContextPut . Matches [ k ] . ContextName , err = replaceContextField ( v . ContextName , ctx ) if err != nil { t . logReplaceError ( " " , err , logger , showReplacementErrors ) } } for idx , match := range t . Expect . Matches { match . ProcessReplacementFields ( ctx ) t . Expect . Matches [ idx ] = match } }
ProcessReplacementFields prefixed by '$' in the testcase Input and Context sections
Call to pre-process custom test cases from discovery model
ProcessReplacementFields prefixed by ' $ ' in the testcase Input and Context sections Call to pre - process custom test cases from discovery model
// errors if field not present in context - which is isReplacement for this function // If customer ip value is not set, remove it from headers