This is the exact representation of a WCF interface and class that I have.
I would like to know how to write a NUnit test for this… using the interface for mocking.
The main thing is I am NOT looking to add a service reference for the WCF service integration test. But some thing more concentrated for the unit testing part. Specifically to test the ProcessStuff method.
namespace CompanyName.Services.ProcessStuff {
public class ProcessStuffService : IProcessStuff
{
public string ProcessStuff(string input)
{
ISomeOtherInterface ProcessManager = new ProcessManager();
return ProcessManager.ProcessStuff(input);
}
}
}
namespace CompanyName.Common.FacadeInterfaces
{
[ServiceContract(Namespace = "com.companyname.services", Name = "Process Stuff Service")]
public interface IProcessStuff
{
[OperationContract(Name = "ProcessStuff")]
string ProcessStuff(string input);
}
}
Okay, I might have mis-read the question, so feel free to clarify.
If the method under test is:
The IProcessStuff interface is irrelevant. You would create a new Process Manager and call this method.
So in this case, I cannot see what Interface you want to mock.