public void DefaultConstructor ()
		{
			ReportSettings rs = new ReportSettings();
			rs.ConnectionString = "goodConnection";
			IDataAccessStrategy da = new MockDataAccessStrategy (rs);
			IDataManager dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(rs,da);			                                                                     
			Assert.IsNotNull (dm,"IDataManager should not be 'null");
		}
        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 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 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);
        }
		public void DataNavigatorNotNull()
		{
			
			ReportSettings rs = new ReportSettings();
			rs.ConnectionString = "goodConnection";
			IDataAccessStrategy da = new MockDataAccessStrategy (rs);
			IDataManager dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(rs,da);
			IDataNavigator dataNav = dm.GetNavigator;
			Assert.IsNotNull(dataNav,"Navigator should not be 'null'");
		}
        public void DefaultConstructor()
        {
            ReportSettings rs = new ReportSettings();

            rs.ConnectionString = "goodConnection";
            IDataAccessStrategy da = new MockDataAccessStrategy(rs);
            IDataManager        dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(rs, da);

            Assert.IsNotNull(dm, "IDataManager should not be 'null");
        }
        public void DataNavigatorNotNull()
        {
            ReportSettings rs = new ReportSettings();

            rs.ConnectionString = "goodConnection";
            IDataAccessStrategy da      = new MockDataAccessStrategy(rs);
            IDataManager        dm      = ICSharpCode.Reports.Core.DataManager.CreateInstance(rs, da);
            IDataNavigator      dataNav = dm.GetNavigator;

            Assert.IsNotNull(dataNav, "Navigator should not be 'null'");
        }
		public void TableCountEqualListCount ()
		{
			
			ReportSettings rs = new ReportSettings();
			rs.ConnectionString = "goodConnection";
			IDataAccessStrategy da = new MockDataAccessStrategy (rs);
			IDataManager dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(rs,da);
			Assert.AreEqual(contributorsList.ContributorCollection.Count,
			                dm.GetNavigator.Count,
			                "TableCount should be equal listCount");
		}
        public void DataNavigatorCorrectPosition()
        {
            ReportSettings rs = new ReportSettings();

            rs.ConnectionString = "goodConnection";
            IDataAccessStrategy da      = new MockDataAccessStrategy(rs);
            IDataManager        dm      = ICSharpCode.Reports.Core.DataManager.CreateInstance(rs, da);
            IDataNavigator      dataNav = dm.GetNavigator;

            Assert.AreEqual(-1, dataNav.CurrentRow);
        }
        public void TableCountEqualListCount()
        {
            ReportSettings rs = new ReportSettings();

            rs.ConnectionString = "goodConnection";
            IDataAccessStrategy da = new MockDataAccessStrategy(rs);
            IDataManager        dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(rs, da);

            Assert.AreEqual(contributorsList.ContributorCollection.Count,
                            dm.GetNavigator.Count,
                            "TableCount should be equal listCount");
        }
		public void DataNavigatorCorrectPosition ()
		{
			
			ReportSettings rs = new ReportSettings();
			rs.ConnectionString = "goodConnection";
			IDataAccessStrategy da = new MockDataAccessStrategy (rs);
			IDataManager dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(rs,da);
			IDataNavigator dataNav = dm.GetNavigator;
			Assert.AreEqual(-1,dataNav.CurrentRow);
		}
		public void ConstructorBadConnectionString ()
		{
			
			ReportSettings rs = new ReportSettings();
			rs.ConnectionString = "bad";
			IDataAccessStrategy da = new MockDataAccessStrategy (rs);
			IDataManager dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(rs,da);
		}
 public void ConstructorNullReportSettings()
 {
     IDataAccessStrategy da = new MockDataAccessStrategy(new ReportSettings());
     IDataManager        dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(null, da);
 }
		public void ConstructorNullReportSettings ()
		{
			IDataAccessStrategy da = new MockDataAccessStrategy (new ReportSettings());
			IDataManager dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(null,da);                                                               
		}
		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 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);
		}
		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'");
		}