You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to mock an UpdateItem<TEntity> to unit test my code. I am following the approach you use in this example. However, it gets very bent out of shape with IUpdateEntityRequestBuilder<TEntity>.
System.TypeLoadException
Method 'Create' in type 'Castle.Proxies.ObjectProxy_2' from assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Which I have also raised on the NSubstiture repo. nsubstitute/NSubstitute#866 I have tried the same thing with Moq and I get the same issue. So it is likely a Castle.Core + EfficientDynamoDb compatibility issue.
Thanks for reporting it @baynezy. The issue happens because of the internal method in IUpdateEntityRequestBuilder. We should add default implementation to this method similarly to IGetItemEntityRequestBuilder/ITableBuilder. It also makes sense to verify that other interfaces are not affected by similar issues and address all of them in a single PR.
I think I can look into it in the next few days. Or you can submit a PR if you want to get this change merged faster.
I am trying to mock an
UpdateItem<TEntity>
to unit test my code. I am following the approach you use in this example. However, it gets very bent out of shape withIUpdateEntityRequestBuilder<TEntity>
.Example
I get an error:
Which I have also raised on the NSubstiture repo. nsubstitute/NSubstitute#866 I have tried the same thing with Moq and I get the same issue. So it is likely a Castle.Core + EfficientDynamoDb compatibility issue.
In this comment @firenero states that:
Is this still the case? Am I doing something wrong?
The text was updated successfully, but these errors were encountered: