6 changed files with 188 additions and 24 deletions
@ -0,0 +1,67 @@
@@ -0,0 +1,67 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Peter Forstmeier |
||||
* Date: 09.09.2010 |
||||
* Time: 19:50 |
||||
* |
||||
* To change this template use Tools | Options | Coding | Edit Standard Headers. |
||||
*/ |
||||
|
||||
using System; |
||||
using System.ComponentModel; |
||||
using ICSharpCode.Reports.Core.Test.TestHelpers; |
||||
using NUnit.Framework; |
||||
|
||||
namespace ICSharpCode.Reports.Core.Test.DataManager |
||||
{ |
||||
[TestFixture] |
||||
public class GroupListFixture |
||||
{ |
||||
|
||||
ContributorCollection contributorCollection; |
||||
|
||||
|
||||
[Test] |
||||
public void GroupingCollection_Empty_IsGrouped_False() |
||||
{ |
||||
IDataManager dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(this.contributorCollection,new ReportSettings()); |
||||
DataNavigator dataNav = dm.GetNavigator; |
||||
|
||||
Assert.That(dataNav.IsGrouped == false); |
||||
} |
||||
|
||||
|
||||
[Test] |
||||
public void GroupingCollection_Contains_IsGrouped_True() |
||||
{ |
||||
var dataNav = PrepareStringGrouping(); |
||||
Assert.That(dataNav.IsGrouped,Is.True); |
||||
} |
||||
|
||||
|
||||
private IDataNavigator PrepareStringGrouping () |
||||
{ |
||||
GroupColumn gc = new GroupColumn("GroupItem",1,ListSortDirection.Ascending); |
||||
ReportSettings rs = new ReportSettings(); |
||||
rs.GroupColumnsCollection.Add(gc); |
||||
IDataManager dm = ICSharpCode.Reports.Core.DataManager.CreateInstance(this.contributorCollection,rs); |
||||
return dm.GetNavigator; |
||||
} |
||||
|
||||
|
||||
[TestFixtureSetUp] |
||||
public void Init() |
||||
{ |
||||
ContributorsList contributorsList = new ContributorsList(); |
||||
this.contributorCollection = contributorsList.ContributorCollection; |
||||
} |
||||
|
||||
|
||||
|
||||
[TestFixtureTearDown] |
||||
public void Dispose() |
||||
{ |
||||
// TODO: Add tear down code.
|
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue