public void Test() { _buildManagerStub.Stub(stub => stub.GetCompiledType("~/VirtualServicePath")).Return(typeof(TestScriptService)); var service = _webServiceFactory.CreateJsonService <IValidJsonService> ("~/VirtualServicePath"); Assert.That(service, Is.InstanceOf <TestScriptService>()); }