Replies: 2 comments 4 replies
-
I hope @JasonBock is reading this, it's a crying shame he is no longer with Magenic 😊 |
Beta Was this translation helpful? Give feedback.
2 replies
-
It is possible that I broke something when rewriting the data portal for CSLA 5. The unit tests pass, but I'm not 100% sure there's a unit test for interfaces explicitly, though they are used here and here. I wonder if the configuration change you make in the test init is actually taking effect? Can you put a breakpoint in your custom activator to make sure it is actually invoked? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
does anybody successfully fetch an interface type from DataPortal?
var item = DataPortal.Fetch<IFake>(1);
Inspired by the article Abstractions in Csla I did some testing using Csla version 5.3.1.
I defined an IFake interface:
and a fake root BO implementing my IFake interface :
The TestActivator is implementing IDataPortalActivator to resolve the type and activate an instance of Fake BO:
I created two simple tests:
The first test "CanFetchType" is successful and my TestActivator is working as expected, however the second test "CanFetchInterface" fails, when Server.DataPortal is trying to find the matching fetch method using the IFake type in ServiceProviderMethodCaller.FindDataPortalMethod[T] resulting in a TargetParameterCountException.
Is it possible to make DataPortal fetch an interface?
Regards
Beta Was this translation helpful? Give feedback.
All reactions