Wednesday, September 29, 2004

System.Security.AccessControl

Valery Pryamikov might have just saved me a bunch of spelunking through MSDN2 (which is still pretty raw.) I had reached a point where I wanted to start adding permission related unit tests, but I quickly got lost in beta documentation with no examples.

I started going through Keith Browns excellent wikibook: "The .NET Developer's Guide to Windows Security" but quickly realized that I should just read the whole thing instead of just jumping in looking for a sample and jumping back out.

So instead I added a nice juicy //TODO: so that I can see it in the task window (one of my favourite features of VS2003 and up) and moved on.

What do I find today but a blog entry on Playing with System.Security.AccessControl.

Nice.

[Listening to: Primus - Fisticuffs]

Thursday, September 23, 2004

A couple links on MSMQ Processing

Wallace McClure posts a couple of articles on MSMQ stuff:

  • MSMQ processing of a string
  • MSMQ Processing of multiple pieces of data

  • I haven't gone through them in any detail, but they look useful enough that I post it here so I don't lose them.

    [Listening to: KoRn - Blind]

    Saturday, September 18, 2004

    An alternate to MbUnit's CurrentFixture

    Now that my library of MbUnit unit tests is growing it's becoming a non-trivial amount of time to run them, something that I'd rather avoid when doing a very tight red/green/refactor loop.

    To speed things up I've been using the CurrentFixture attribute like so:

    [CurrentFixture]
    
    [Test]
    public void DoSomeTest()
    {
    ...
    and the associated property of the AutoRunner in main:
    public static void Main (string[] args)
    
    {
    using (AutoRunner auto = new AutoRunner ())
    {
    auto.Domain.Filter = FixtureFilters.Current;
    ...

    The issue is, I keep having to check out my previous test fixture to remove the attribute so I can worry only about my current fixture. That leads to a lot of comments like "Removed CurrentFixture attribute" in my version control.

    Here's what I now do. I don't use CurrentFixture at all. Instead I have the following in main:
    public static void Main (string[] args)
    
    {
    using (AutoRunner auto = new AutoRunner ())
    {
    auto.Domain.Filter
    = FixtureFilters.Type ("My.Full.Class");
    ...

    Now I only need to check out the main line (or more often just keep it checked out) to work on another fixture.

    [Listening to: Stone Temple Pilots - Trippin' on a Hole in a Paper Heart]