Posts

Showing posts from 2009

Testing Exceptions in Nunit 4.7

I am getting in TDD a lot, and of course, when thinking in border cases, you'll end up throwing exceptions, And you'd want to see ith they get thrown. With Nunit 4.7 the thing is that If, for example, you're testing that some parameter is null, when you decorate your test with [ExpectedException] it eventually gets thrown, but You'll never know what piece of code actually did it...
So, I created this little R# snippet to test excxeptions in a more granular way:
[Test] public void $TestName$() { try { $Code$ } catch (Exception e) { Assert.That(e, Is.TypeOf(typeof($ExpectedException$))); $END$ return; } Assert.Fail("Did Not Throw the Exception."); }
For example, if you want to test if a parameter is null before you excercise some code, you could have a test like this:

[Test] public void Intermediary_ParamOneCannotBeNull() { try { new Intermediary(null, null); } catch(Exception e) { Assert.That(e, Is.TypeOf(typeof(ArgumentNullException…

Alt.NET in Colombia

I recently found @jorgegamba, which has been very active on VAN meetings for hispanic community.

He is also from Colombia and share the same interest on making Alt.Net widespread on Colombia.

He is trying to build a community for Colombian programmers who want to grow as agile .net programmers. I beleive is a very good initiative and I'm planning on supporting his idea any way possible.

Adelante Jorge!

Debugging Sharepoint Applications

When developing sharepoint apps, it becomes a pain in the neck to know what process to lint to (via debug-attach process) because it usually has many w3wp process running, and knowing which is the one you need is usually a trial-and-error thing.

Spence Harbar has a very handy application called Application Pool Manager which lets you do several things:

1. Reset application pools, which is faster than iisreset.
2. Show the list of application pools running
3. Establish which application pool has which process ID associated, and refresh it if someone else recycled them (i.e. VSeWSS)

This way, by just having a look at the tool's menu, you can know for sure what process ID you need to attach to!

Firefox add-ins I use

I love the customization FF can give you!! I have a lot of add-ons installed, preety useful for all my work and browsing time:
All in one gestures :
Lets you have mouse gestures to control your browser
Distrust:
erases all browsing info from a session (useful when browsing in sites that can install sw in your machine)
Firebug:
Developer toolbar... lets you analyze your HTML and http traffic
FlashGot:
DL manager, I use it with FlashGet to manage my dls, it even let you DL Toutube moveies!!!
Google Gears:
With this addon I can work Google docs, Gmail, Calendar offline!!
Google Toolbar:
the classic one!
IE Tab:
Lets you open a page in FF using the engine of IE.MileWideBack:
allows you to navigate and close tabs using the left margin of your browser.
ScreenGrab:
capture screenshots of your pages
TabSidebar:
shows you all open tabs in a vertical toolbar, showing a thumbnail of the page. you can even browse back and foth without having to switch to that tab.
Web Developer Toolbar:
Lots of goodies for We…

My WinVista looks like a Mac :)

Image
Hi. In Dec/january, working with Zemoga, I got a Mac. I loved the OSX. hated not having right-clic on the trackpad, the different keys for common Office tasks, different default behaviours, but it was a nice experience.

I prefer Win though, and since XP is so nineties, I upgraded to Vista busoiness 64 bit.

In order to be more Mac-alike, I found some tools very nice:

ObjectDock




It emulates MacOSX toolbar very well..... I like it, and I'll like it more when it supports X64 OS
http://stardock.com

Switcher
This tool makes switching application just like in Mac. small thumbnails of all your windows, and you sleect the one yo like....
http://insentient.net/Switcher/Overview.html

with these apps, I feel I have a Next-get OS UI!!!
Let's see what Win7 can add to this....