nickdodd79 / AutoBogus

A C# library complementing the Bogus generator by adding auto creation and population capabilities.
MIT License
431 stars 50 forks source link

gRPC RepeatedFields cause AmbiguousMatchException #22

Closed rccampbe closed 4 years ago

rccampbe commented 4 years ago

Because RepeatedField classes have 2 Add methods (taking a Type and an IEnumerable), the new GetAddMethod doesn't know which to use and throws an AmbiguousMatchException.

rccampbe commented 4 years ago

Fix proposed in pull request #23

nickdodd79 commented 4 years ago

Awesome. Thanks for your quick work. I'll get a new version out ASAP.

nickdodd79 commented 4 years ago

Hey @rccampbe

Unfortunately locating the Add() method based on an ICollection arg type broken a load of tests. I have instead made it locate the method using the generic types. I have also added a test using a RepeatedField<int> and everything passes as expected.

Can you get v2.7.1 and check it still works your end?

Thanks, Nick.

rccampbe commented 4 years ago

I'm curious how it was working for the few tests I ran, but, regardless, using the generic type is the better way to go. I'll rerun my test cases in the morning and let you know.

On Wed, Sep 11, 2019, 6:18 PM Nick Dodd notifications@github.com wrote:

Hey @rccampbe https://github.com/rccampbe

Unfortunately locating the Add() method based on an ICollection arg type broken a load of tests. I have instead made it locate the method using the generic types. I have also added a test using a RepeatedField and everything passes as expected.

Can you get v2.7.1 and check it still works your end?

Thanks, Nick.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nickdodd79/AutoBogus/issues/22?email_source=notifications&email_token=AAM7RTO64GAXLBAS33X54TDQJFVC3A5CNFSM4IVTZJTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6QCD5I#issuecomment-530588149, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM7RTLO6B3UZWUSNHLXERDQJFVC3ANCNFSM4IVTZJTA .

rccampbe commented 4 years ago

All my tests are passing. Thanks, Nick!