Open dalewking opened 4 years ago
Imho, the UseCase itself is an abstraction, so there is no need to abstract it again.
It isn't as problematic as it would be in Java where you don't have implicit interfaces, but any time you can reduce dependencies it is a good thing.
I am not saying that an abstraction needs to be created. The UseCase abstraction already exists and I am just suggesting that the existing abstraction is used instead of the concrete class. The only issue then is where Params is declared.
You have this:
Which is hardcoding a dependency on GetConcreteNumberTrivia and GetRandomNumberTrivia types.
Shouldn't that really be:
where Params would be a type (probably better named) in entities or better yet just use int instead and make
GetConcreteNumberTrivia
implementUseCase<NumberTrivia, int>