public void CheckDataSource()
        {
            ReportSettings rs = new ReportSettings();

            rs.ConnectionString = "goodConnection";
            IDataAccessStrategy da = new MockDataAccessStrategy(rs);

            ICSharpCode.Reports.Core.DataManager dm = (ICSharpCode.Reports.Core.DataManager)ICSharpCode.Reports.Core.DataManager.CreateInstance(rs, da);
            Assert.IsAssignableFrom(typeof(System.Data.DataTable), dm.DataSource);
        }
        public void CheckIsSorted()
        {
            ReportSettings rs = new ReportSettings();

            rs.ConnectionString = "goodConnection";
            IDataAccessStrategy da = new MockDataAccessStrategy(rs);

            ICSharpCode.Reports.Core.DataManager dm = (ICSharpCode.Reports.Core.DataManager)ICSharpCode.Reports.Core.DataManager.CreateInstance(rs, da);
            Assert.IsFalse(dm.IsSorted, "IsSorted should be 'false'");
        }
        public void CheckDataMember()
        {
            ReportSettings rs = new ReportSettings();

            rs.ConnectionString = "goodConnection";
            IDataAccessStrategy da = new MockDataAccessStrategy(rs);

            ICSharpCode.Reports.Core.DataManager dm = (ICSharpCode.Reports.Core.DataManager)ICSharpCode.Reports.Core.DataManager.CreateInstance(rs, da);
            Assert.AreEqual("ContributorTable", dm.DataMember);
        }
Beispiel #4
0
		public static IDataManager CreateInstance (IList dataSource, ReportSettings reportSettings)
		{
			if (dataSource == null) {
				throw new ArgumentNullException("dataSource");
			}
			
			if (reportSettings == null) {
				throw new ArgumentNullException("reportSettings");
			}
			
			IDataManager instance = new DataManager(dataSource,reportSettings);
			return instance ;
		}