I submitted this to the Resharper cool code snippet competition and thought I would share it with everyone else, including why it’s cool!
[Test] public void $METHOD$$SCENARIO$$EXPECTATION$() { $END$ }I’ve been doing a lot of TDD lately and I am constantly writing new tests. So my number one snippet is one that creates a simple test. I’ve tweaked this template a lot, it started out with a simple test template with only one editable occurance for a name. In “The Art of Unit Testing,” Roy Osherove talks about test readability which starts with the test name itself. He suggests putting the test method name together with three components. First, name the method under test (the Act in AAA), that way related tests for the same method are easy to identify (and actually R# sorts test fixture test methods by name so this is even more useful with Code Cleanup :) ). Second, name it with a scenario, what is unique about the given context of the test (known as the Arrange in AAA). Finally, include the outcome of the test, the expectation (Assert in AAA). This way you know all of what will go into the test before you write it!
So yeah Google Cal Sync doesn’t work with Outlook 2010 Preview, but I found a way to get it to jive.
I edited Outlook.exe in C:\Program Files\Microsoft Office\Office14 using Notepad++ with the Hex-Editor plugin. At assembly location 0x000c09b2, I changed the value to 0x32, in the ascii dump. It originally read (14.0.0 and now reads (12.0.0
Good luck, I have no idea what this might break, I hope it is just the outlook version that the add in manager reports to add ins :). I have successfully synced events to and from my GCal!
-Wes
If you are doing custom Linq to Sql mappings, it currently doesn’t support having your own base Entity class that you extend all your entities from. I found out the hard way through painful debugging. However, it seems if you do this with the version of .net 3.5 sp1 on the Win 7 RC it will work, so this may not be a bug forever!