Sunday, April 29, 2012

AROCA Sprints - Sandown Motor Circuit


I was back at Sandown again today for another try at a better lap time. Since the last time I was at Sandown, the parts on the car that are different are the DBA 4000 slotted rear rotors and the front brake pads. I fitted the Project Mu HC+ front pads again as the Project Mu Level Max900i pads were too harsh.

Session 1
1:50.9929 1:30.9017 1:33.7821 1:33.5591 1:30.2257 1:35.3221 1:35.8109 1:30.2612

Session 2
1:48.5825 1:32.8667 7:22.2710 1:48.5849 1:37.8147 1:36.6162 

Session 3
1:41.5749 1:33.2464 1:41.6169 1:32.1120 1:31.3743 1:33.3182 1:32.3516 

Session 4
1:52.8549 1:31.4204 1:30.0035 1:30.8259 1:31.9522 1:29.0031 1:27.8767 1:31.3727

This time around, there were many cars slower than mine in my run group. So the first three sessions were spent overtaking and not getting clean laps. Sessions 2 and 3 were especially frustrating as I was caught behind a Torana that was faster than the Z in a straight line but much slower in the corners. There was no way I could pass him as I didn't want to dive in under brakes on him during corners and he wouldn't let me pass on the straights. In session 4, I aimed to get out on to the track before the Torana by lining up early. Fortunately, the Torana was out in the session before mine with its second driver and did not join me for mine. I managed to get a few clean laps in and ended up with a new personal best time of 1:27.87.

From the speed graph, it looks like I found some time at turn 1, braking later at the end of the back straight (around the 100 metre sign), and turns 6 and 8. So overall, I'm very happy with the results today. Thank you to Exe Crew for coming along to drive and/or support. You know who you are.







Saturday, April 28, 2012

Wednesday, April 18, 2012

Smart device/.NET CF unit testing: No mocking

Seeing as the .NET Compact Framekwork does not have/support any mocking frameworks available for unit testing, here's a reference for writing your own stubs to fake out your external dependencies when unit testing smart device projects:

http://elegantcode.com/2009/04/29/unit-testingmocking-on-net-cf/

Smart device unit testing: deploying additional resources

A handy reference with different ways of deploying additional resources (e.g. sdf files) to the device/emulator for smart device unit test projects:

http://blogs.msdn.com/b/prativen/archive/2008/02/05/deployment-in-smart-device-unit-tests.aspx

Thursday, April 12, 2012

Unit testing smart device projects - TestContext error

A couple of days ago I started creating unit tests for a Windows Mobile smart device project that I have been working on in Visual Studio 2008. I generated a unit test method for one of the methods in one of the classes and attempted to run the test. This is when I ran into an error that took me several hours to solve, so hopefully posting this helps someone.

The test method failed to run due to the following error:

Error: System.ArgumentException: Object of type 'Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapterContext' cannot be converted to type 'Microsoft.VisualStudio.TestTools.UnitTesting.TestContext'


Googling the error returned results that suggested it was caused by upgrading a test project from Visual Studio 2005 format to 2008, and that the reference to the UnitTestFramework.dll was still for the old version (8.0) and required updating. This did not apply to me as I had not upgraded my test project from VS2005. So I continued searching.

After hours of searching for other causes for the error without success, I stumbled upon the following references in the smart device project:

Microsoft.WindowsMobile.dll
Microsoft.WindowsMobile.Status.dll

Visual Studio was obtaining these references from the following folder:

C:\Program Files\Windows Mobile 5.0 SDK R2\Managed Libraries

However, the smart device project's target platform was the Windows Mobile 6 Professional SDK. I didn't notice this before as I did not originally create the smart device project. So I removed the references to the two DLLs and readded them from the following folder:

C:\Program Files\Windows Mobile 6 SDK\Managed Libraries

After rebuilding the smart device project, running the test method succeeded.