When creating test names, I use a BDD style naming convention to describe the behaviour being tested. As such, I like the naming to be in a particular, consistent style. For example:
However, as you can see Resharper is saying there is a problem because of the way the method has been named. Ideally, Resharper should allow this naming convention. With Resharper 5 (maybe in 4.5 too), you can change the setting to match how you want your naming to be.
Simply by hitting alt+enter you have some options related to Inconsistent naming.
In the settings dialog, you can set the name style. In my name, First_upper is how I like my tests to be named.
Resharper will now accept the naming. As a bonus, if the name happened to be Something_Like_This() then it would detect and provide an option to convert the naming to Something_like_this() keeping your test naming consistent which improves readability. Very cool!
However, the problem now is that ReSharper complaints on production code. For example:
Luckily, you can define two possible naming conventions as I’ve done below.
Any time my hands are not on my keyboard my productivity is being harmed. Visual Studio + ReSharper has some really nice keyboard shortcuts which means I don’t need to use my mouse. However, one shortcut which just feels to me plain forgotten is being able to close a file using the keyboard. I can open, switch between but cannot close! Thankfully you can bind your own shortcuts, as such I bound to Ctrl+Q. Having this simply makes everything a little bit easier. But please, Visual Studio or ReSharper – auto-bind this command.
Note: Visual Studio 2010 Beta 2 is a bit buggy when it comes to keyboard shortcut. I had to un-assign anything bound to the key and restart the app before it took effect.
It has been a while since the first EAP build of ReSharper 4 was released. There was some discuss on the forums that build 755 was good so I thought I would look at they have been doing. This isn’t the latest, but just potentially stable release.
The first thing to notice is that they have a new installer. This installer covers both VS 2005 and VS 2008 integration, previously they had two separate installers. There are two options, Install and Advanced. Install just uses the default configuration, where as Advanced you can configure different options. By default, it will integrate into both 2005 and 2008.
Screen once it is installing: Bug – Says ReSharper 3.0 Setup.
Everything looked to be working just fine.
The first thing I noticed is that they have removed the little window in the corner which tells you what is going on. This information is now in Visual Studio’s status bar, this cause less distraction.
The first item I heard to work correctly was Linq. A quick query provides that ReSharper doesn’t provide errors about the Linq syntax like in previous versions. The intellisense window also highlights the keywords such as Select and OrderBy.
One problem I found with this is that if you remove unused references, it will remove System.Linq but generally it is looking good for Linq.
Sadly, it still doesn’t support Partial Methods
JetBrains have also introduced a Errors in Solution window. This is great, apart from if you have auto-generated code. While you can configure it to folder a filefolder, it would be much better if this supported wildcard expressions – then I could say ignore *.dbml and *.designer.* etc.
It looks like 4.0 is moving along and they are working hard to solve problems. Build 755 is looking good.