Open joseboretto opened 4 months ago
When you need to assert the call, you have to copy/duplicate the "Calls" struct.
// When s.GetPerson(ctx, "1") // Then actual := personStore.GetCalls() expected := []struct { Ctx context.Context ID string }{ { Ctx: ctx, ID: "1", }, } if !reflect.DeepEqual(expected, actual) { t.Fatalf("Expected %v but got %v", expected, actual) }
Create the "Calls" struct as an independent struct
// When s.GetPerson(ctx, "1") // Then actual := personStore.GetCalls() expected := []PersonStoreMockGetCalls{ { Ctx: ctx, ID: "1", }, } if !reflect.DeepEqual(expected, actual) { t.Fatalf("Expected %v but got %v", expected, actual) }
For Go templates, the commonly used file extensions are: .gohtml:
For Go templates, the commonly used file extensions are:
https://www.jetbrains.com/help/idea/integration-with-go-templates.html
Problem
When you need to assert the call, you have to copy/duplicate the "Calls" struct.
Example
Solution
Create the "Calls" struct as an independent struct
Example
Extra
https://www.jetbrains.com/help/idea/integration-with-go-templates.html