コード例 #1
0
        public void Create_SingleDataSource_ReturnsStackDataSourceImplementation()
        {
            var factory = new StackDataSourceFactory( myPrimaryDsFactory, mySecondaryDsFactory );
            var dataSource = factory.Create( "Prices", typeof( ISingleDataSource<SimplePrice> ), NamedParameters.Null );

            Assert.That( dataSource, Is.InstanceOf<StackSingleDataSource<SimplePrice>>() );
        }
コード例 #2
0
        public void Create_WhenCalled_InnerDataSourcesArePassed()
        {
            var factory = new StackDataSourceFactory( myPrimaryDsFactory, mySecondaryDsFactory );
            var dataSource = factory.Create( "Prices", typeof( IEnumerableDataSource<SimplePrice> ), NamedParameters.Null );

            var typedDS = (StackEnumerableDataSource<SimplePrice>)dataSource;

            Assert.That( typedDS.DataSources.Count(), Is.EqualTo( 2 ) );
        }