Skip to content

Make FakeDatabase more easy to replace #170

Open

Description

@nickevansuk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions