コード例 #1
0
        public ODataWCFServiceTestsBase(ServiceDescriptor serviceDescriptor)
        {
            TestServiceUtil.ServiceUriGenerator = ServiceGeneratorFactory.CreateServiceUriGenerator();
            this.serviceDescriptor = serviceDescriptor;

            TestServiceWrapper = new WCFServiceWrapper(this.serviceDescriptor);
            TestServiceWrapper.StartService();
            RetrieveServiceEdmModel();
            TestClientContext = Activator.CreateInstance(typeof(TClientContext), ServiceBaseUri) as TClientContext;
            ResetDataSource();
        }
コード例 #2
0
ファイル: EndToEndTestBase.cs プロジェクト: pbvs/odata.net
        /// <summary>
        /// Initializes a new instance of the EndToEndTestBase class.
        /// Initialization for the tests, called prior to running each test in this class.
        /// </summary>
        /// <param name="serviceDescriptor">Descriptor for the service that these tests will target.</param>
        protected EndToEndTestBase(ServiceDescriptor serviceDescriptor, ITestOutputHelper output)
        {
            TestServiceUtil.ServiceUriGenerator = ServiceGeneratorFactory.CreateServiceUriGenerator();
            this.serviceDescriptor = serviceDescriptor;
            this.serviceWrapper    = new DefaultServiceWrapper(this.serviceDescriptor);
            this.TestCompleted     = false;
            this.serviceWrapper.StartService();

            this.ResetDataSource();
            this.CustomTestInitialize();

            var   helper = (TestOutputHelper)output;
            ITest test   = (ITest)helper.GetType().GetField("test", BindingFlags.NonPublic | BindingFlags.Instance)
                           .GetValue(helper);

            testClassName = test.TestCase.TestMethod.TestClass.Class.ToString();
            testName      = test.TestCase.TestMethod.Method.Name;
        }
コード例 #3
0
 public ODataWCFServiceTestsBase(ServiceDescriptor serviceDescriptor)
 {
     TestServiceUtil.ServiceUriGenerator = ServiceGeneratorFactory.CreateServiceUriGenerator();
     this.serviceDescriptor = serviceDescriptor;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the EndToEndTestBase class.
 /// </summary>
 /// <param name="serviceDescriptor">Descriptor for the service that these tests will target.</param>
 protected EndToEndTestBase(ServiceDescriptor serviceDescriptor)
 {
     TestServiceUtil.ServiceUriGenerator = ServiceGeneratorFactory.CreateServiceUriGenerator();
     this.serviceDescriptor = serviceDescriptor;
 }