|
Having trouble using the Silverlight Unit Testing Framework in conjuction with the "HSS.ServiceModel.VirtualServiceProvider". The steps I've taken after adding the Silverlight Unit Testing App Project template to my VS2010 Solution include the
following
- Added "existing" project reference to the new Unit Testing Project in my solution
- Copied "existing" service contract/interface to the Unit Testing class
- Created test method and applied [TestMethodAttribute]
- Modiified Global.asax in the Unit Test Hosting Web App
All of my Unit Test that evaluate "Getter" and "Setter" method properties work, but when I attempt to execute a Unit Test that trys to invoke a method in a ViewModel class created in a separate project referenced by the Unit Testing
project, I receive errors "VirtualChannelNotInitializedException was unhandled by user code...
Here's my application_startup in the Gloabal.asax
protected void Application_Start(object sender, EventArgs e)
{
VirtualServiceProvider.Initialize("MyToken", false);
VirtualServiceProvider.Register("services");
}
[TestMethod]
[Tag("Save")]
public void Save_WaterFallRule()
{
Create_ViewModelInstatnce();
VirtualChannel<INPVService>.Invoke<MXRuleResults>(s => s.UpdateWaterfallRules(this.TRule,false),
(results, ex) => {....... }
Anybody able to point me to a tutortial, walkthrough or provide a code example of HSS Core Framework being used with the Microsoft Testing Framework ?
|