C# Class NUnit.Gui.Presenters.DisplayStrategy

DisplayStrategy is the abstract base for the various strategies used to display tests in the tree control. It works primarily as a traditional strategy, with methods called by the TreeViewPresenter, but may also function as a presenter in it's own right, since it is created with references to the view and mode. We currently support three different strategies: NunitTreeDisplay, TestListDisplay and FixtureListDisplay.
显示文件 Open project: nunit/nunit-gui Class Usage Examples

Protected Properties

Property Type Description
_model ITestModel
_nodeIndex List>.Dictionary
_view ITestTreeView

Public Methods

Method Description
CalcImageIndex ( ResultState outcome ) : int
CollapseToFixtures ( ) : void
DisplayStrategy ( ITestTreeView view, ITestModel model ) : System
GetResultForTest ( TestNode testNode ) : ResultNode
GetTreeNodesForTest ( TestNode testNode ) : List
GroupDisplayName ( NUnit.Gui.Presenters.TestGroup group ) : string
MakeTreeNode ( TestNode testNode, bool recursive ) : TreeNode
OnTestFinished ( ResultNode result ) : void
OnTestLoaded ( TestNode testNode ) : void

Load all tests into the tree, starting from a root TestNode.

OnTestUnloaded ( ) : void
Reload ( ) : void

Protected Methods

Method Description
ClearTree ( ) : void
CollapseToFixtures ( TreeNode treeNode ) : void
MakeTreeNode ( NUnit.Gui.Presenters.TestGroup group, bool recursive ) : TreeNode

Private Methods

Method Description
ApplyResultsToTree ( TreeNode treeNode ) : void

Method Details

CalcImageIndex() public static method

public static CalcImageIndex ( ResultState outcome ) : int
outcome ResultState
return int

ClearTree() protected method

protected ClearTree ( ) : void
return void

CollapseToFixtures() public method

public CollapseToFixtures ( ) : void
return void

CollapseToFixtures() protected method

protected CollapseToFixtures ( TreeNode treeNode ) : void
treeNode System.Windows.Forms.TreeNode
return void

DisplayStrategy() public method

public DisplayStrategy ( ITestTreeView view, ITestModel model ) : System
view ITestTreeView
model ITestModel
return System

GetResultForTest() public method

public GetResultForTest ( TestNode testNode ) : ResultNode
testNode TestNode
return ResultNode

GetTreeNodesForTest() public method

public GetTreeNodesForTest ( TestNode testNode ) : List
testNode TestNode
return List

GroupDisplayName() public method

public GroupDisplayName ( NUnit.Gui.Presenters.TestGroup group ) : string
group NUnit.Gui.Presenters.TestGroup
return string

MakeTreeNode() protected method

protected MakeTreeNode ( NUnit.Gui.Presenters.TestGroup group, bool recursive ) : TreeNode
group NUnit.Gui.Presenters.TestGroup
recursive bool
return System.Windows.Forms.TreeNode

MakeTreeNode() public method

public MakeTreeNode ( TestNode testNode, bool recursive ) : TreeNode
testNode TestNode
recursive bool
return System.Windows.Forms.TreeNode

OnTestFinished() public method

public OnTestFinished ( ResultNode result ) : void
result ResultNode
return void

OnTestLoaded() public abstract method

Load all tests into the tree, starting from a root TestNode.
public abstract OnTestLoaded ( TestNode testNode ) : void
testNode TestNode
return void

OnTestUnloaded() public method

public OnTestUnloaded ( ) : void
return void

Reload() public method

public Reload ( ) : void
return void

Property Details

_model protected_oe property

protected ITestModel _model
return ITestModel

_nodeIndex protected_oe property

protected Dictionary> _nodeIndex
return List>.Dictionary

_view protected_oe property

protected ITestTreeView _view
return ITestTreeView