Inheritance: AppHostHttpListenerBase
コード例 #1
0
        public void OnTestFixtureSetUp()
        {
            appHost = new OperationTestsAppHost();
            appHost.Init();

            var dummyServiceType = GetType();

            appHost.Metadata.Add(dummyServiceType, typeof(GetCustomer), typeof(GetCustomerResponse));
            appHost.Metadata.Add(dummyServiceType, typeof(GetCustomers), typeof(GetCustomersResponse));
            appHost.Metadata.Add(dummyServiceType, typeof(StoreCustomer), null);

            operationControl = new OperationControl
            {
                HttpRequest = new MockHttpRequest {
                    PathInfo = "", RawUrl = "http://localhost:4444/metadata"
                },
                MetadataConfig  = ServiceEndpointsMetadataConfig.Create(""),
                Format          = Format.Json,
                HostName        = "localhost",
                RequestMessage  = "(string)",
                ResponseMessage = "(HttpWebResponse)",
                Title           = "Metadata page",
                OperationName   = "operationname",
                MetadataHtml    = "<p>Operation</p>"
            };
        }
コード例 #2
0
ファイル: OperationTests.cs プロジェクト: AVee/ServiceStack
        public void OnTestFixtureSetUp()
        {
            appHost = new OperationTestsAppHost();
            appHost.Init();
#if NETCORE
            appHost.Start(Config.ListeningOn);
#endif

            var dummyServiceType = GetType();
            appHost.Metadata.Add(dummyServiceType, typeof(GetCustomer), typeof(GetCustomerResponse));
            appHost.Metadata.Add(dummyServiceType, typeof(GetCustomers), typeof(GetCustomersResponse));
            appHost.Metadata.Add(dummyServiceType, typeof(StoreCustomer), null);

            operationControl = new OperationControl
            {
                HttpRequest = new MockHttpRequest {PathInfo = "", RawUrl = "http://localhost:4444/metadata"},
                MetadataConfig = ServiceEndpointsMetadataConfig.Create(""),
                Format = Format.Json,
                HostName = "localhost",
                RequestMessage = "(string)",
                ResponseMessage = "(HttpWebResponse)",
                Title = "Metadata page",
                OperationName = "operationname",
                MetadataHtml = "<p>Operation</p>"
            };
        }
コード例 #3
0
        public void OnTestFixtureSetUp()
        {
            _appHost = new OperationTestsAppHost();
            _appHost.Init();

            _operationControl = new OperationControl
            {
                HttpRequest = new MockHttpRequest {PathInfo = "", RawUrl = "http://localhost:4444/metadata"},
                MetadataConfig = ServiceEndpointsMetadataConfig.Create(""),
                Format = Format.Json,
                HostName = "localhost",
                RequestMessage = "(string)",
                ResponseMessage = "(HttpWebResponse)",
                Title = "Metadata page",
                OperationName = "operationname",
                MetadataHtml = "<p>Operation</p>"
            };
        }
コード例 #4
0
        public void OnTestFixtureSetUp()
        {
            _appHost = new OperationTestsAppHost();
            _appHost.Init();

            _operationControl = new OperationControl
            {
                HttpRequest = new MockHttpRequest {
                    PathInfo = "", RawUrl = "http://localhost:4444/metadata"
                },
                MetadataConfig  = ServiceEndpointsMetadataConfig.Create(""),
                Format          = Format.Json,
                HostName        = "localhost",
                RequestMessage  = "(string)",
                ResponseMessage = "(HttpWebResponse)",
                Title           = "Metadata page",
                OperationName   = "operationname",
                MetadataHtml    = "<p>Operation</p>"
            };
        }