Closed bthaile closed 5 months ago
Need to return an interface so I can mock it out for unit tests in flow-cli. I could add new methods that return interfaces and leave the old ones as pass throughs.
This is a breaking change. Is there another approach you can take?
Updated PR to not have breaking changes. Maintain the old generating binding file methods
Can you explain more about what this gets you and why its needed? The description isn't very clear.
It's the same pattern used for FlixService
it allows mocking out for unit tests. Also better design to return an interface instead of a concrete class.
Naming is Verb Noun, existing is GenerateTemplate, GenerateBinding. Could start interfaces with I
but that doesn't seem to be the convention.
I'm open to whatever naming.
Could have interfaces named: BindingGenerator, TemplateGenerator. Change to Noun Verb and adding or
You should consider creating a mock with mockery and publish it. That is what is done in some of the other flow libraries.
You should consider creating a mock with mockery and publish it. That is what is done in some of the other flow libraries.
Do you have a link to a pattern that you think works well?
Flow cli has some mockery. Just search for it there. I like the expecter options
Flow cli has some mockery. Just search for it there. I like the expecter options
Sorry for the short comment. On my way! To bed
Reorganized the code base. Better naming convention. Added binding file generator to main Flix service, they both need to fetch flix templates. Kept Template generator as it's own since it's functionality is isolated from the rest.
Put logic into internal directory Consolidated functionality into FlixService Updated naming