I'm still working on this documentation as I think it's useful to have
something down even if it's going to change in future. I'm looking at
the default rule:

rules.Add(
    new PatternRoute("/")
        .DefaultForController().Is("staticcontent")
        .DefaultForAction().Is("home")
);

Obviously this should match thusly:

[TestMethod]
public void Root()
{
    RoutingRules.Register(RoutingModuleEx.Engine);

    RouteMatch match = RoutingModuleEx.Engine.FindMatch("/",
CreateGetContext());

    Assert.IsNotNull(match);
    Assert.AreEqual("staticcontent", match.Parameters["controller"]);
    Assert.AreEqual("home", match.Parameters["action"]);
}

The trouble is that when I'm running through IIS I cannot get this to
match. If I do not have a Default.aspx placeholder, I get a directory
listing. If I have a Default.aspx then I see the contents of
Default.aspx. Incidentally the extension i'm using for my application
is .ashx at the moment.

On Wed, Nov 19, 2008 at 9:49 PM, Colin Ramsay <[EMAIL PROTECTED]> wrote:
> I think it would definitely be of benefit to try and state the problem
> to provide context to the rest of the documentation, if nothing else,
> and if that helps define a better solution then that's a good side
> benefit.
>
> On Wed, Nov 19, 2008 at 8:44 PM, hammett <[EMAIL PROTECTED]> wrote:
>>
>> Given the fact that I've been writing specs for the last 3 months, I
>> wonder if we should try this for the routing stuff.
>>
>> The spec - at least on devdiv - is a definition of behavior, public
>> API, consideration and issues. It is also used to create the
>> documentation. Would that lead to waterfalling a supposedly agile
>> environment? I'm not sure. What I know is that I've spent many hours
>> writing and refactoring the routing stuff without a clear and
>> agreeable definition of the whole problem space.
>>
>> Thoughts?
>>
>>
>> On Wed, Nov 19, 2008 at 5:54 AM, Colin Ramsay <[EMAIL PROTECTED]> wrote:
>>>
>>
>> --
>> Cheers,
>> hammett
>> http://hammett.castleproject.org/
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to castle-project-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to