January 2005 - Posts

.NET Celebrity Auction

Julia Lerman is auctioning off a bunch of her friends on eBay (with their consent as I understand it).  These people happen to be well known personalities on the .NET conference and blogging scene.  At the moment you can pick up an hour of consultancy time for a little over $100.  Considering that you can't usually buy quality consultancy by the hour, this is obscenely good value!

When you realize that 100% of your bid will go to help the tsunami victims of Banda Aceh rebuild their lives, bidding in this auction should be a no brainer!  Remember that it ends Feb-02-05 06:00:00 PST.  You will have to bid something over $100 otherwise you'll be out of luck.

[Our .NET Ebay Auction *is* Tax-Deductible]

I have been asked about the auction being tax deductible.

Absolutely!

So get your clients and your companies to bid!! I told my clients about the auction and said "hey, can you hire me some help for when I get really stuck on something?" Even an hour of having someone like Kimberly Tripp take a look at their SQL Server setup would be invaluable!!

What are you waiting for?

Posted by Jamie Cansdale | 3 comment(s)
Filed under:

Testing Internal Methods

Over on the Windojitsu blog, Shawn has come up with a minimalist alternative to NUnit. The main reason given is not wanting to inflict a dependency on anyone who wants to build his project.

TestDriven.NET already supports the idea of light weight testing frameworks. These frameworks can be invisible to the outside world (non-public) and conditionaly compiled out. They can be used if you want to test internal classes/methods or if you don't want a dependency on the 'nunit.framework' assembly.

Here is an example framework, quite similar to the one Shawn defined.

#if TEST
namespace Testing.Framework
{
using System;

[AttributeUsage(AttributeTargets.Class)]
internal class TestFixtureAttribute : Attribute { }

[AttributeUsage(AttributeTargets.Method)]
internal class TestAttribute : Attribute { }
}
#endif

You can then write your unit tests as follows (note that classes and methods are internal and private by default).

#if TEST
namespace Testing.Framework
{
using
System;
using Testing.Framework;
 [TestFixture]
class TestFix
{
[Test] void TestUnit()
{
throw new Exception("Boom!");
}
}
}
#endif

Remember to define a TEST conditional compilation constant in your Debug builds!

Update: Gus pointed out that "Unused referenced assemblies don't actually stick around". If you are disciplined enough to wrap all of your tests in #if TEST blocks - any referenced 'nunit.framework' assembly won't be referenced in the final output. If you use the above method and conditionaly compile out the framework itself, any tests that reference it won't compile if TEST isn't defined (you don't have to count on discipline).

I'm not saying that light weight testing frameworks are a good thing (otherwize I would have blogged about them before). They are however a thing and if you need them (or are paranoid) they're supported. ;o)

ResX Sucks!

Shawn has 5 reasons to hate ResX files!  He also has a ResXCop tool to help keep your ResX files .NET 1.0 compatible. I'm hoping the MSBuild team will have solved some of these issues.

In its default mode, it simply warns of the presence of binary (base64) data elements...  in its aggressive mode (/v switch) it will remove those base64 elements, and also back-port any CLR references it finds to the specified value.  For example, the /v=1.0.3300.0 switch is useful for preparing a build to target .NET v1.0.

Posted by Jamie Cansdale | 3 comment(s)
Filed under:

Show Clipboard Contents

[harriyott.com]

This can't be right. Scary huh? Very!
IE users only. ;o)

More Posts