/Community

A Support Community for SubMain Products
in Search
Welcome to SubMain Community Sign in | Join | Help

Naming rule

Last post 05-08-2008, 11:31 AM by niros. 2 replies.
Sort Posts: Previous Next
  •  05-06-2008, 1:37 PM 521

    Naming rule

    We have a project that has over 100 WinForms bound to DataSets. We want to implement UI automation for testing purpose but our testers complain that most controls inside the forms have generic names like gridControl1, gridControl2, ... They want more specific names, for example if a grid gridControl2 is bound to a table inv_Adjustment, the name of the grid should be inv_AdjustmentDataGrid.

    Is it possible in CodeIt.Right to create a custom rule that looks in code for something like:

    gridControl2.DataMember = "Inv_Adjustment";

    and rename gridControl2 to inv_AdjustmentGridControl?

    If this is too much, what would be the best approach?

    Thank you,

    Sorin 

    gridControl2.DataMember = "Inv_Adjustment";

    and rename gridControl2 to inv_AdjustmentGridControl?

    If this is too much, what would be the best approach?

    Thank you,

    Sorin 

  •  05-08-2008, 1:42 AM 527 in reply to 521

    Re: Naming rule

    Yes, this rule is possible although it is not the easiest one to write. You basically would need to search through the code object model for a particular expression for each grid control... We may have resource to help you with the rule once we reach a milestone end of next week.

     


    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
  •  05-08-2008, 11:31 AM 533 in reply to 527

    Re: Naming rule

    Yes, I can wait, thanks for offering to help Smile

    Sorin

View as RSS news feed in XML