public void Test()
        {
            _buildManagerStub.Stub(stub => stub.GetCompiledType("~/VirtualServicePath")).Return(typeof(TestScriptService));

            var service = _webServiceFactory.CreateWebService <IValidWebService> ("~/VirtualServicePath");

            Assert.That(service, Is.InstanceOf <TestScriptService>());
        }
Beispiel #2
0
        public void Test_VirtualPathCannotBeCompiled()
        {
            _buildManagerStub.Stub(stub => stub.GetCompiledType("~/VirtualServicePath")).Return(null);

            Assert.That(
                () => _webServiceFactory.CreateWebService <IInvalidInterface> ("~/VirtualServicePath"),
                Throws.InvalidOperationException.And.Message.EqualTo("Web service '~/VirtualServicePath' could not be compiled."));
        }