my blog RSS 2.0
 Friday, February 17, 2006

I just emailed Jamie Cansdale at TestDriven.NET but in the meantime, this might come in useful to someone out there using TestDriven.NET...

As discussed in the FAQ you can use access appSettings values from a .config file.

I discovered a way of making this just a little bit easier to manage:
  • Add an App.Config file to your Class Library root folder along with all your tests, and rename it to match the name of the .dll of the unit test class library (e.g. MyProject.Tests.dll.config)
  • Add your config settings (i.e. appSettings and so on) in the normal way
It this point, when trying to run a test, TestDriven (or possibly NUnit itself?) will not be able to find your config settings because the config file should really have been placed in the bin folder but we'd then need to manage 2 copies (one for each of the Release and Debug folders), and anyway, it's easier for you to see and manage the config file if it's in the project root folder along with all your other classes rather than having to move it to the bin folder (because we'd then have to mess about doing 'show all files' and 'include in project')

To get round this problem without having to move the config file:
  • Add a pre-build command to the unit test project:
    (i.e. under the Project Properties dialog (Build Events | Pre-Build Command Line))
  • enter the following command:
    xcopy $(ProjectDir)$(TargetFileName).config /YR

this will copy the [tests.dll].config file to the (Release or Debug) bin folder

Assumptions:
  • This advice applies to VS2003, it is probably very similar for VS2005 but I've not tried it (in fact, if I remember correctly, VS2005 has a much more intuitive method for copying files into the bin directory at build time which won't need an xcopy command...)
  • Your unit tests reside in their own Class Library project
UPDATE: Jamie Cansdale has also now posted on this topic
Friday, February 17, 2006 4:12:52 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
TDD
 Monday, May 09, 2005

Fed up of having to vote against the policies you hate most (tactical voting) rather than voting for the party or policies you really wanted to vote for?...

I wish I had known sooner about The Guardian's campaign as I would certainly have liked to have worn a peg on my nose while giving Tony my little 'X': http://www.guardian.co.uk/g2/story/0,3604,1479344,00.html

So, for what it's worth, I decided to back the campaign for reform to the voting system in the UK. You can do the same if you so choose: http://www.makemyvotecount.org.uk

Monday, May 09, 2005 12:03:27 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

 Wednesday, April 06, 2005

The other day I was looking again at where the excellent FlexWiki project has been progressing and I decided I'd like to download the sourcecode, only to realise I'd need a CVS client to access the source-control database. I promptly downloaded TortoiseCVS and was stunned to discover how easy it was to use. It got me thinking that I might as well start running a CVS locally on my machine for source-control.

I then naturally revisited the idea of using Subversion instead as I had read many times how it was "a compelling replacement for CVS" . It so happens that I decided to just start off with TortoiseSVN (a client app for Subversion) with the aim of seeing how that works and it turns out that it has an amazingly handy feature whereby you can use TortoiseSVN to setup and run a source-control repository locally. TortoiseSVN then treats that location on your hard drive exactly as if it were a Subversion server proper.

With this proliferation of Tortoises in my life I decided to hark back to my days as a Zoology student and have a look at what other  Chelonia I might expect to find here in Europe. I like the Golden Greek Tortoise the best...

Golden Greek Tortoise

see http://www.chelonia.org/European_Gallery.htm for more!

 

Wednesday, April 06, 2005 4:49:47 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

I passed my first MCP exam today with a satisfyingly high score (hint: > 900)!

I'm delighted to be able to say with confidence that I am now a certified expert in Developing and Implementing Web Applications with Visual C#.Net and Visual Studio.NET (070-315)

[UPDATE] after kind congrats from Thomas Williams I thought I'd say something about how I managed this feat ;-)

For anyone else wanting to do the same, be aware that the MS Press books DON'T cover everything you need to know in the exams. While they're a good foundation they miss out material or don't go into enough detail. I have read very good reviews of the MCSD/MCAD Training Guide by Amit Kalani if you want to be sure of not missing anything.

Of course, there's no substitute for experience of actually using the technology (which is a good thing of course - dump the braindumps).

 

 

 

Wednesday, April 06, 2005 3:47:48 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] -

 Friday, February 25, 2005
This is just to test that my new dasBlog blog is cross-posting OK to my SharePoint blog and to my dotnetjunkies blog
Friday, February 25, 2005 12:10:59 PM (GMT Standard Time, UTC+00:00)  #    Comments [2] -
blogging
 Wednesday, February 23, 2005

Welcome to my new blog.

Don't expect much content just now as I want to work out how to migrate articles from my dotnetjunkies blog first, and to consider the implications of moving over from a blog that has a referral from MSDN!

[UPDATE]

The entries from my SharePoint themed blog carried over beautifully thanks to DotText2DasBlog. Kudos to Aaron Junod for the source code for that! I think there must be something very wrong going on with the install of .Text over at dotnetjunkies - I just keep getting a 'NullReferenceException' when trying to access BlogContent.asmx or SimpleBlogService.asmx.

Hopefully sometime soon they'll install the very exciting new Community Server 1.0 as announced recently by Rob Howard.

Wednesday, February 23, 2005 4:10:34 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] -
blogging
 Thursday, December 16, 2004
I discovered today that Indexing List Items so that they appear in Search Results doesnt happen by default and I thought "surely this can't be right". Luckily (thanks to Daniel McPherson) if you follow this link you'll see that you can still enable this on a list-by list basis
Thursday, December 16, 2004 10:10:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
SharePoint
 Thursday, September 16, 2004

Christa Carpentiere has done yet another implementation of reporting off an ADO.Net Dataset but this time it's in an MSDN article, and it's in both VB.Net and C#.

This one add something interesting though, as it also shows how you might call an external assembly to generate the DataSet.

 

 

Thursday, September 16, 2004 3:40:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Reporting Services
 Wednesday, August 18, 2004

Toby Riley emailed me to alert me to his extension that can take a select query and execute it against any DB using a connection string as a parameter and pass the data back to the designer:

http://workspaces.gotdotnet.com/appworld

Another blogger of note has also come online lead developer for the Reporting Services product by the name of 'Tudor'.

Wednesday, August 18, 2004 3:04:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Reporting Services
Archive
<February 2006>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
2627281234
567891011
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008
Rohan Cragg
Sign In
Statistics
Total Posts: 24
This Year: 0
This Month: 0
This Week: 0
Comments: 41
Themes
Pick a theme:
All Content © 2008, Rohan Cragg
DasBlog theme 'Business' created by Christoph De Baene (delarou)