Comments to Revision 1089: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
(Remove CancelSaveException section - that got pulled from OpenPetra)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The [http://bzr.openpetra.org:8088/loggerhead/trunk/revision/1089 revision 1089] contains a set of changes:
The [http://bzr.openpetra.org:8088/loggerhead/trunk/revision/1089 revision 1089] contains a set of changes:


== A new TreeViev-Control ==
== A new TreeView-Control ==


If the user selects a tree view node and then changes to any other control of a dialog (tree view will lost its focus in this case) the selected node becomes indistinguishable to the other nodes. This situation is something difficult because the user has no orientation about the node he is dealing with.  
If the user selects a tree view node and then changes to any other control of a dialog (tree view will lost its focus in this case) the selected node becomes indistinguishable to the other nodes. This situation is something difficult because the user has no orientation about the node he is dealing with.  
Line 11: Line 11:
== A new class: CommonNUnitFunctions ==
== A new class: CommonNUnitFunctions ==


== A new common Exception: CancelSaveException ==
A new class has been added to the test sources, the class [http://bzr.openpetra.org:8088/loggerhead/trunk/revision/1089#csharp/ICT/Testing/NUnitForms/CommonNUnitFunctions.cs CommonNUnitFunctions]. This class inherits NUnitFormTest and in a new test class you can easily replaces NUnitFormTest against CommonNUnitFunctions.
 
In this case you will have the use of some internal test functions and the very first one is the standard handler for a message box. Other controls may follow. So it will be a good idea to change or to add a template in SharpDevelope.
 
Open to discuss: Log-File initialization ...


== A prototype for a dialog tester - TFrmGLAccountHierarchyTester ==
== A prototype for a dialog tester - TFrmGLAccountHierarchyTester ==
For NUnit a set of several small tester classes has been written. A more specific interest may be the tester class [http://bzr.openpetra.org:8088/loggerhead/trunk/revision/1089#csharp/ICT/Testing/NUnitForms/TFrmGLAccountHierarchyTester.cs TFrmGLAccountHierarchyTester].
The best form to understand this file is to compare this to the dialog which shall be tested specially the part file: [http://bzr.openpetra.org:8088/loggerhead/trunk/revision/1089#csharp/ICT/Petra/Client/lib/MFinance/gui/setup/GLAccountHierarchy.Designer.cs GLAccountHierarchy.Designer].
And here let us see only one control. An entry of the yaml-file generates the line:
this.trvAccounts = new Ict.Common.Controls.TTrvTreeView();
Tree view will be created and configured in the automatic code part. The idea is to create a TFrmGLAccountHierarchyTester class which shall be used in the tests. This class itself shall provide a control to access and test the tree view.
TFrmGLAccountHierarchyTester hierarchyTester = new TFrmGLAccountHierarchyTester();
hierarchyTester.trvAccounts.SelectNode(...);
That means:
# Easy access to the controls and the functions which shall be tested
# Small and easy readable test software
I think the most important todo is: Generation of this tester classes …

Latest revision as of 15:34, 21 February 2013

The revision 1089 contains a set of changes:

A new TreeView-Control

If the user selects a tree view node and then changes to any other control of a dialog (tree view will lost its focus in this case) the selected node becomes indistinguishable to the other nodes. This situation is something difficult because the user has no orientation about the node he is dealing with.

Therefore the TrvTreeView has been added to the project. This tree view inherits System.Windows.Forms.TreeView and adds the functionality of holding a different color for the node selected at last before a LostFocusEvent.

This new tree view has been integrated in the code generation components so that the maximal work you have to do is to run a nant generateWinforms command to use this control.

A new class: CommonNUnitFunctions

A new class has been added to the test sources, the class CommonNUnitFunctions. This class inherits NUnitFormTest and in a new test class you can easily replaces NUnitFormTest against CommonNUnitFunctions.

In this case you will have the use of some internal test functions and the very first one is the standard handler for a message box. Other controls may follow. So it will be a good idea to change or to add a template in SharpDevelope.

Open to discuss: Log-File initialization ...

A prototype for a dialog tester - TFrmGLAccountHierarchyTester

For NUnit a set of several small tester classes has been written. A more specific interest may be the tester class TFrmGLAccountHierarchyTester.

The best form to understand this file is to compare this to the dialog which shall be tested specially the part file: GLAccountHierarchy.Designer.

And here let us see only one control. An entry of the yaml-file generates the line:

this.trvAccounts = new Ict.Common.Controls.TTrvTreeView();

Tree view will be created and configured in the automatic code part. The idea is to create a TFrmGLAccountHierarchyTester class which shall be used in the tests. This class itself shall provide a control to access and test the tree view.

TFrmGLAccountHierarchyTester hierarchyTester = new TFrmGLAccountHierarchyTester();
hierarchyTester.trvAccounts.SelectNode(...);

That means:

  1. Easy access to the controls and the functions which shall be tested
  2. Small and easy readable test software

I think the most important todo is: Generation of this tester classes …