-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Added new long route constraint and updated the int route constraint to int #1569
Conversation
@@ -24,6 +24,23 @@ public void Should_resolve_int_constraint() | |||
} | |||
|
|||
[Fact] | |||
public void When_int_is_larger_than_max_int_should_has_no_match() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
G/W/T to make @thecodejunkie happy 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at the tests, they don't constitute G/W/T, so its pointless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree but I think he wants them regardless. In your tests I'd do //Given/When on the browser get and a //Then over the assert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd put // Given
in the ctor
, // When
over the the this.browser.Get
and // Then
over the assert
Apart from GWT nickpicking 👍 |
Added new long route constraint and updated the int route constraint to int
add GWT comments to ConstraintNodeRouteResolverFixture
Added the new constraint to the wiki 😄 |
How is this a breaking change? |
Because of this, the 'int' constraint changed from If anyone was using |
👌 |
What is the reason for this "fix" ? A lot of refactoring, checking, casting and/or double routing is needed now. I don't agree in the statement that "the user is stupid" Am i missing something ? |
@drankard we could have added 'number' but then we have The check for us is not expensive. Its potentially expensive for the module. |
Fix for #1565 because @mat-mcloughlin was too slow.
Note:
If you have two constraints on the same URL for
int
andlong
then first in wins since the scoring will be the same. But there's no way for us to truly know which route to pick.If the user puts in 1000 but wants it to hit the long route then it may pick the int route.
But we can't prevent this, and the user is stupid if they're making routes like this anyway.