nUnit ...


Author
Message
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
Currently I'm using nUnit successfully but in order to do so I must make a call to the SetDataSources() method in the AppMain.cs program ... nUnit tests are located in the BOLibrary proejct.  My first stab at accomplishing this was to add a reference to the BOLibrary project referencing the WinForms project then make the call.  Unfortunately this results in a cyclical reference error when nUnit testing is over and I'm dropping BOs on the forms.  I got around this by using VB6's method of inheritence (Ctrl+C) but would prefer not to duplicate code.

So, how do I make a call to FMG_CC.AppMain.SetDataSources() from the BOLibrary project... without including a reference to that project ...

Thanks,

CT

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
First, we use unit testing as well (Team Foundation)....and we take a different approach.  We have a an entry point for unit testing that sets up the data sources....the only way that you call call the SetDataSources from a BO which is more than likely referenced by the entry point assembly (this would cause a circular reference) is to either create an interface that you apply to the AppMain class that just as a SetDataSources method ... or use reflection and invoke the method.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search