Skip to content
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

Added new Types overloads #62

Merged
merged 4 commits into from
Jan 8, 2015
Merged

Conversation

khellang
Copy link
Contributor

@khellang khellang commented Jan 6, 2015

Here's a couple of (in my opinion) missing overloads for Types.

This also fixes half of #56

I went a bit overboard with breaking changes here. They are contained in the three last commits. If you want me to I can strip them out 😄

@@ -15,7 +14,7 @@ public class DomainTests
public DomainTests()
{
domainEntities = Types.InAssemblyOf<DomainClass>("Domain Entities",
types => types.Where(t=>t.Namespace.StartsWith("SampleApp.Domain")));
type => type.Namespace.StartsWith("SampleApp.Domain"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is an issue, but this would stop us doing a select many. Can you think of a reason you would need to project from a type into multiple types?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Maybe you could return all implemented interfaces or base classes? Anyway, the method is still there, it's just obsolete. I could remove the ObsoleteAttribute and just let it sit there with the rest 😄

@JakeGinnivan
Copy link
Member

I think I will add the public ctor back so you can do new Types(), just to save the breaking change. But nice change

Did you want to put it back to public, or should I just merge and change after. Up to you

@khellang
Copy link
Contributor Author

khellang commented Jan 8, 2015

I think I will add the public ctor back so you can do new Types(), just to save the breaking change.

Done. There's still a breaking change with Type[] TypesToVerify -> IEnumerable<Type> TypesToVerify though.

JakeGinnivan added a commit that referenced this pull request Jan 8, 2015
@JakeGinnivan JakeGinnivan merged commit b7aac39 into TestStack:master Jan 8, 2015
@khellang khellang deleted the types-overloads branch January 8, 2015 11:34
@khellang
Copy link
Contributor Author

khellang commented Jan 8, 2015

👍

@JakeGinnivan
Copy link
Member

Ah yeah, the breaking change with the setter on TypesToVerify.

We could leave it as a public setter and .ToArray in the setter if it doesn't inherit from IList (which an array will when checked). Or we just bump the semver.

@khellang
Copy link
Contributor Author

khellang commented Jan 8, 2015

It's up to you. Personally I prefer my types to be immutable, but if we want to prevent a breaking change, I don't have a problem making the setter public again.

@JakeGinnivan
Copy link
Member

I think we should leave it this way.

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.

None yet

2 participants