Comment

Comment by bearzdev

There are other libraries than Moq. Nsubstitute, FakeItEasy, etc.

With Moq and most mocking libraries, you generally just need to make a method virtual for mocking concrete classes.

Most mocking libraries use Castle Project's Dynamic Proxy, so they should be able to inject things without the need of interfaces. Interfaces for everything comes from the .net community's obsession with patterns, abstraction, clean architecture, and DDD.

You can use vscode with file based projects. With Rider/Visual Studio you can show hidden folder so long as they are in a folder or subfolder of a project.

Otherwise, you'll need to add a solution folder and items to the solution folder.

parent bearzdev 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton