Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FakeDatabase more easy to replace #170

Open
nickevansuk opened this issue Nov 22, 2021 · 0 comments
Open

Make FakeDatabase more easy to replace #170

nickevansuk opened this issue Nov 22, 2021 · 0 comments

Comments

@nickevansuk
Copy link
Contributor

nickevansuk commented Nov 22, 2021

Reported issue:

We use strings for our Ids, meaning that when I tried to follow the "Configuring IBookableIdComponents" instruction in day 2 of the tutorial (https://tutorials.openactive.io/open-booking-sdk/quick-start-guide/storebookingengine/day-2-open-data-feeds#configuring-ibookableidcomponents), changing the ids from long? to string caused unfixable build errors. Which I fixed by going through and changing all the sigs etc on the OpenActive.FakeDatabase.Net from long to string. But might be better to have that whole setup generic in TId?

[I need to do that in order to follow the tutorial] ... day 1, get the test suite running with all test impls, day 2, implement the feeds properly, day 3 - 8, get the booking api working?

As it stands, on day 2, if I update the id types from long to string, it no longer builds, so either the instructions should start with "unplug the test impls and create stubs for your real impls", or there should be a generic version of the test impls so you can choose your id strategy up front I think?

Proposed solution:

Investigate whether FakeDatabase.NET could support both long and string IDs, to make it easier to partially implement without removing all the FakeDatabase.NET references in one go.

Also consider whether a "stub" based approach could be used after day 3-8, where the whole FakeDatabase is removed at once and replaced with stubs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant