C# Unit Test Case Help -
i learning c# (coming java background) , trying implement test cases in practice. have been through few examples of creating test cases basic , dealt obvious constraints (i.e., angle between 0-360).
i going thru examples of creating forms , have not been able find examples on implementing tests forms. done , if give me few examples of test int following example:
namespace tabcontrolexample { public partial class form1 : form { public form1() { initializecomponent(); createnewcompanytab("test company 1"); createnewcompanytab("test company 2"); } private void createnewcompanytab(string companyname) { basecompanypanel companypanel = new basecompanypanel(); tabpage tabpage = new tabpage(); // set tab text tabpage.text = companyname; // set companypanel.parent value tabpage // insert companypanel tab companypanel.parent = tabpage; tabcontrol.tabpages.add(tabpage); } } } namespace tabcontrolexample { public partial class basecompanypanel : usercontrol { public basecompanypanel() { initializecomponent(); } } }
this example creates user control can reused on multiple tabs.
any appreciated.
tia,
brian enderle
you should have business logic separate ui. if can, may want explore using wpf , mvvm.
Comments
Post a Comment