Do I have to rewrite my code to do this into an interface? Or is there an easier way? I am using Moq
there is an easy way. for example if we have WebService class with the name DbService, first create an interface for it (ex. IService), and use this interface for mocking, then add a class to your project and put this:
public partial class DbService:IService {
}
leave class empty, because of web services are partial class we use this implementation. (previously