New Posts New Posts RSS Feed: Does Faking need the BOS?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Does Faking need the BOS?

 Post Reply Post Reply
Author
cseils View Drop Down
Newbie
Newbie
Avatar

Joined: 29-Mar-2011
Location: Australia
Posts: 10
Post Options Post Options   Quote cseils Quote  Post ReplyReply Direct Link To This Post Topic: Does Faking need the BOS?
    Posted: 25-Jul-2011 at 5:50pm
Hello,

I am created an EntityManager in a unit test using the CompositionContext.Fake with the following line of code:

var em = new DomainModelEntityManager(compositionContextName: CompositionContext.Fake.Name);

This works fine when running the silverlight unit test runner from the browser.
However when I run this from Devexpress's Coderush Test runner, I get the white screen of death and in the StatLight test runner, I get the more informed error of:

An unknown request was made to the StatLight's web server. You may want to check your test project for what generated the following request.
********** Request Information **********
       Url : http://localhost:8887/EntityService.svc/sl

Is it possible to use faking this way without the Business object server running?  

Thanks
Chris

Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 28-Jul-2011 at 8:42am
Hi Chris,
 
Unfortunately, faking in Silverlight does need the BOS, since the faking implementation is making async calls to the server where the fake store is located.   Since this isn't realistic with an automated test runner, another approach for your unit tests might be to use a disconnected EntityManager with preloaded test data, say from an EntityCacheState.  Some of the code samples take this approach, one being the "Querying" sample at http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-querying.
  
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down