Skip to content

Major improvements to the Words functionality #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Feb 11, 2016
Merged

Major improvements to the Words functionality #50

merged 16 commits into from
Feb 11, 2016

Conversation

mwhelan
Copy link
Member

@mwhelan mwhelan commented Feb 5, 2016

All of the file dictionaries have been added to the Any API via equivalence class extension methods.

Any.AddressAusCity();

In addition, can now access any built-in or user-defined dictionary with a single interface

Any.Words(FromDictionary.InternetUrl)
// E.g. Any.Words(FromDictionary.InternetUrl).Data
// E.g. Any.Words(FromDictionary.InternetUrl).Next()
Any.Words("MyCustomDictionary").Data;

This PR does propose breaking changes to the API. With the explosion of Any methods, names such as Any.EmailAddress have changed to Any.PersonEmailAddress so that all categories of methods are grouped together with a one-to-one mapping to the name of the file the data originated from. These are subject to agreement by @robdmoore of course.

@mwhelan
Copy link
Member Author

mwhelan commented Feb 5, 2016

I think the CI server isn't handling a C#6 feature I used on line 28 of the Words class. Sorry, I did try to resist those, but sometimes they just slip in... ;-)

@robdmoore
Copy link
Member

Drop the C#6 stuff. Happy to look into adding that (and getting CI server ready for it), but definitely would want that in a separate PR.

I'd also prefer to avoid breaking changes for this one. I'm happy with the new grouped names, but let's keep the existing ones too and simply call the new ones.

For things like Any.FirstName that are so obvious / common I like them to be less verbose and more obvious. Same with the new Any.Words.

We'll also need to get all of these added to the documentation when merging.

We'll need to bump minor version too since we are adding new features.

@mwhelan
Copy link
Member Author

mwhelan commented Feb 7, 2016

Agreed about the C#6. Better to do it in one go, but a few slipped in. ;-) I'll take them out.

So, does that mean keep Any.FirstName and Any.PersonFirstName, where the result is the same?

Do the new names not already make this a breaking change? Or are breaking changes only classed as things that change rather than additional things too?

My only concern with keeping things like Any.FirstName is just how big the interface is. I was even wondering if we could come up with Any.Person.FirstName type things, but some categorisation seems like a good thing

@robdmoore
Copy link
Member

It's not a breaking change if we add something new to the surface area. Removing something that was there is though.

I'm comfortable with Any.Person.* etc. as well. that might be better for intellisense.

I still like having the existing ones we had with their previous names too though since I think they are common ones that people will want to use so should be quick and easy to get to.

@mwhelan
Copy link
Member Author

mwhelan commented Feb 7, 2016

Awesome. I'm happy with all your suggestions and will try to address them all. Thanks for the great feedback.

mwhelan added a commit that referenced this pull request Feb 11, 2016
Major improvements to the Words functionality
@mwhelan mwhelan merged commit 8310b7f into TestStack:master Feb 11, 2016
@mwhelan mwhelan deleted the any-api branch February 11, 2016 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants