New Posts New Posts RSS Feed: MethodDef has IsOverload property, but no IsVirtual property?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

MethodDef has IsOverload property, but no IsVirtual property?

 Post Reply Post Reply
Author
robert.hui View Drop Down
Newbie
Newbie


Joined: 11-Aug-2010
Posts: 5
Post Options Post Options   Quote robert.hui Quote  Post ReplyReply Direct Link To This Post Topic: MethodDef has IsOverload property, but no IsVirtual property?
    Posted: 11-Aug-2010 at 2:39pm
There's a bit of trouble I'm running into with setting up unit tests for logic that queries from an EntityManager.

I've been able to stub dummy entities into a disconnected EntityManager, but there's one piece of code that calls to a stored procedure, and this isn't allowed in a disconnected state.

I'd like to code-generate the method call to invoke the stored procedure as a virtual method so that we can override it in test scenarios to return dummy data, instead of trying to connect to a database.

My question is, why does the MethodDef class contain an IsOverload property, but no IsVirtualProperty? Is this planned for a future release?

I'm also open to alternatives ways to test this scenario where a stored procedure call needs to be dummied for testing purposes.
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 11-Aug-2010 at 6:30pm

Yes, we will provide IsVirtual on the class.  This should make the next release.

Back to Top
robert.hui View Drop Down
Newbie
Newbie


Joined: 11-Aug-2010
Posts: 5
Post Options Post Options   Quote robert.hui Quote  Post ReplyReply Direct Link To This Post Posted: 13-Aug-2010 at 9:34am
That's great to hear. After more digging around, I noticed that the IsOverride property only applies to VB, whereas we use C#. Will this IsVirtual property be applicable to C#?
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 13-Aug-2010 at 4:46pm
Yes, we'll make it applicable for both languages.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down