You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to run unit test on a service, which have a mocked dependency for mysql connector (changed to memory connector to avoid spinning of database and subsecuent actions). But when trying to do any repository action with this connector, the service method throws an error (that .beginTransaction should be implemented by the connector)
Use Cases
I would like to be able to do these tests with the in memory connector, so far I have been thinking about making a Class binding that gets a transaction, a real one from the connector (if it exists, probably making the same checks that datasource-juggler uses), and a dummy interface in the case of the memory connector, but to avoid any of this (and any api decision related to it), it would be simpler (I recognize that not necesarilly better) to make the in-memory-connector adjust to that specific interface
Acceptance criteria
TBD - will be filled by the team.
If any further explanation is needed, I will expand on this discussion
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was trying to run unit test on a service, which have a mocked dependency for mysql connector (changed to memory connector to avoid spinning of database and subsecuent actions). But when trying to do any repository action with this connector, the service method throws an error (that .beginTransaction should be implemented by the connector)
Use Cases
I would like to be able to do these tests with the in memory connector, so far I have been thinking about making a Class binding that gets a transaction, a real one from the connector (if it exists, probably making the same checks that datasource-juggler uses), and a dummy interface in the case of the memory connector, but to avoid any of this (and any api decision related to it), it would be simpler (I recognize that not necesarilly better) to make the in-memory-connector adjust to that specific interface
Acceptance criteria
TBD - will be filled by the team.
If any further explanation is needed, I will expand on this discussion
Beta Was this translation helpful? Give feedback.
All reactions