コード例 #1
0
 public void ShouldReturnNonExportedTypeFromServiceProvider()
 {
     var helper = new ProviderHelper();
     var connectionProvider = new StubConnectionAndServiceProvider();
     var actual = helper.GetCustomProvider<IQueryPager>(connectionProvider);
     Assert.IsInstanceOf(typeof(IQueryPager), actual);
 }
コード例 #2
0
 public void ShouldNotRequestExportableTypeFromServiceProvider()
 {
     var helper = new ProviderHelper();
     var connectionProvider = new StubConnectionAndServiceProvider();
     var actual = helper.GetCustomProvider<ITestInterface>(connectionProvider);
     Assert.IsNull(connectionProvider.RequestedServiceType);
 }
コード例 #3
0
 public void ShouldRequestNonExportedTypeFromServiceProvider()
 {
     var helper = new ProviderHelper();
     var connectionProvider = new StubConnectionAndServiceProvider();
     var actual = helper.GetCustomProvider<IQueryPager>(connectionProvider);
     Assert.AreEqual(typeof(IQueryPager), connectionProvider.RequestedServiceType);
 }
コード例 #4
0
 public void ShouldResolveCustomInserter()
 {
     var helper = new ProviderHelper();
     var connectionProvider = new StubConnectionProvider();
     var actual = helper.GetCustomProvider<ICustomInserter>(connectionProvider);
     Assert.IsInstanceOf(typeof(StubCustomInserter), actual);
 }
コード例 #5
0
        public void ShouldResolveCustomInserter()
        {
            var helper             = new ProviderHelper();
            var connectionProvider = new StubConnectionProvider();
            var actual             = helper.GetCustomProvider <ICustomInserter>(connectionProvider);

            Assert.IsInstanceOf(typeof(StubCustomInserter), actual);
        }
コード例 #6
0
        public void ShouldReturnNonExportedTypeFromServiceProvider()
        {
            var helper             = new ProviderHelper();
            var connectionProvider = new StubConnectionAndServiceProvider();
            var actual             = helper.GetCustomProvider <IQueryPager>(connectionProvider);

            Assert.IsInstanceOf(typeof(IQueryPager), actual);
        }
コード例 #7
0
        public void ShouldRequestNonExportedTypeFromServiceProvider()
        {
            var helper             = new ProviderHelper();
            var connectionProvider = new StubConnectionAndServiceProvider();
            var actual             = helper.GetCustomProvider <IQueryPager>(connectionProvider);

            Assert.AreEqual(typeof(IQueryPager), connectionProvider.RequestedServiceType);
        }
コード例 #8
0
        public void ShouldNotRequestExportableTypeFromServiceProvider()
        {
            var helper             = new ProviderHelper();
            var connectionProvider = new StubConnectionAndServiceProvider();
            var actual             = helper.GetCustomProvider <ITestInterface>(connectionProvider);

            Assert.IsNull(connectionProvider.RequestedServiceType);
        }
コード例 #9
0
 private Operators CreateOperators()
 {
     return(ProviderHelper.GetCustomProvider <Operators>(_schemaProvider) ?? new Operators());
 }