PivotalServicesOss / moq_datareader

Library helps in mocking IDataReader using Moq for unit testing
MIT License
1 stars 2 forks source link

MockDataReader confusing not supported exception for nullables #8

Closed ShadowDIO closed 1 year ago

ShadowDIO commented 1 year ago

I started using your project for testing some DataReaders and misconfigured the MockDataColumns from the MockDataTable for nullable fields, adding the nullable type to the second parameter, when trying to run the tests, I simply got a NotSupportedException Nullable'1; after cloning your code I found that while nullable types are not supported for types, they are when defining the columns, I added a case to spot these scenarios and added a message to the exception thrown indicating to use the third parameter in the MockDataColumn for those cases. I want to commit the correction but it says my user has no permissions for this repo. Can I make that change?

alfusinigoj commented 1 year ago

Can you please create a PR and let me know?

alfusinigoj commented 1 year ago

So that I can review and merge it to the package.

ShadowDIO commented 1 year ago

I can't commit my branch since I don't have permissions, I see an invitation to collaborate but it is saying that it no longer exists.

alfusinigoj commented 1 year ago

For now, can you please try creating a fork and create a PR from there?

Meanwhile I ll see what went wrong with the invite.

— Regards, Alfus Jaganathanhttps://www.alfusjaganathan.com Githubhttps://github.com/alfusinigoj | LinkedInhttps://www.linkedin.com/in/alfusinigojaganathan/ | Twitterhttps://twitter.com/AlfusinigoJhttps://twitter.com/AlfusinigoJ (Sent from mobile) https://aka.ms/o0ukef


From: ShadowDIO @.> Sent: Tuesday, July 18, 2023 5:16:17 PM To: PivotalServicesOss/moq_datareader @.> Cc: Alfus Inigo Jaganathan @.>; State change @.> Subject: Re: [PivotalServicesOss/moq_datareader] MockDataReader confusing not supported exception for nullables (Issue #8)

I can't commit my branch since I don't have permissions, I see an invitation to collaborate but it is saying that it no longer exists.

— Reply to this email directly, view it on GitHubhttps://github.com/PivotalServicesOss/moq_datareader/issues/8#issuecomment-1641002679, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFIUSQW2LQMIK4E6TMFMZGLXQ34KDANCNFSM6AAAAAA2O4JM3Q. You are receiving this because you modified the open/close state.Message ID: @.***>

alfusinigoj commented 1 year ago

Released v2.0.1, based on your PR #9 https://www.nuget.org/packages/PivotalServices.MoqExtensions.DataReader/