refactored Interceptor.Intercept to use a set of strategies. . #31

Merged
merged 2 commits into from Feb 28, 2013

Conversation

Projects
None yet
2 participants
@FelicePollano
Contributor

FelicePollano commented Oct 3, 2012

Function was previously a little difficult to figure out due to many ifs and returns. I broken up the function in 8 different strategies, of course not yet perfect, but should be easyier to modify/read.

@kzu

This comment has been minimized.

Show comment
Hide comment
@kzu

kzu Oct 3, 2012

Can we make the return value an enum that explains what it means to return one or the other? It's not clear to me what the boolean is in each case. Maybe InterceptionAction.Continue | Stop ?

Can we make the return value an enum that explains what it means to return one or the other? It's not clear to me what the boolean is in each case. Maybe InterceptionAction.Continue | Stop ?

This comment has been minimized.

Show comment
Hide comment
@FelicePollano

FelicePollano Oct 4, 2012

Owner

Yep it is actually a continue / stop. I will replace with an enum. Do you think that refactoring is helpful, or did you expect something different.

Owner

FelicePollano replied Oct 4, 2012

Yep it is actually a continue / stop. I will replace with an enum. Do you think that refactoring is helpful, or did you expect something different.

This comment has been minimized.

Show comment
Hide comment
@kzu

kzu Oct 4, 2012

kzu replied Oct 4, 2012

@kzu

This comment has been minimized.

Show comment
Hide comment
@kzu

kzu Oct 3, 2012

Member

Much needed refactoring. It's looking very promising. Thanks for working on this.

Member

kzu commented Oct 3, 2012

Much needed refactoring. It's looking very promising. Thanks for working on this.

@FelicePollano

This comment has been minimized.

Show comment
Hide comment
@FelicePollano

FelicePollano Oct 4, 2012

Contributor

I added the enum. Test still pass. Maybe you would also rename the strategies: My is sometimes just a guessing, maybe they are not generally understendable.

Contributor

FelicePollano commented Oct 4, 2012

I added the enum. Test still pass. Maybe you would also rename the strategies: My is sometimes just a guessing, maybe they are not generally understendable.

kzu added a commit that referenced this pull request Feb 28, 2013

Merge pull request #31 from FelicePollano/dev
refactored Interceptor.Intercept to use a set of strategies. .

@kzu kzu merged commit f3a0141 into moq:dev Feb 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment