Helix.Examples icon indicating copy to clipboard operation
Helix.Examples copied to clipboard

Remove FakeDb nuget package reference

Open sshushliapin opened this issue 5 years ago • 2 comments

In SC9+ unit testing goes better without FakeDb (yep, that's me saying that)... Just get rid of this NuGet package.

sshushliapin avatar Oct 21 '19 19:10 sshushliapin

@sshushliapin Last I looked, mocking a tree of items was still a pain. I've even considered a project to back the FakeDb tree format with a mocking framework, but for the time stuck with it as-is.

Do you have an example of mocking something like this? Care to submit a PR if it's still readable?

nickwesselman avatar Oct 22 '19 01:10 nickwesselman

Sure. The issue as I see it is that existing services are a bit overloaded (even in such a simplified model). The HeaderBuilder class deals with both data model and presentation model. Splitting this things should make code more testable.

I'll come up with a PR, hope it'll make it more clear.

sshushliapin avatar Oct 23 '19 07:10 sshushliapin