C#C
C#2y ago
Denis

Unit Testing gRPC server with EF Core

I have an ASP.NET Core gRPC server that exposes several endpoints. Calling these endpoints affects a connected database via EF Core.

How can I effectively test the gRPC endpoints while also mocking the database?
The db is abstracted through an interface.

Let's say my endpoints are:
  • CreateGreeting, and
  • GetAllGreetings
Was this page helpful?