Make sure your test project's app.config has the same values. I use a pre build script to copy from my lob code to me test code.
Philip Japikse, MCSD.Net, MCDBA, CSM Pinnacle Solutions, Inc [email protected] www.japikse.blogspot.com twitter/skimedic (513) 312-5664 (sent from mobile device) -----Original Message----- From: quaffapint <[email protected]> Sent: Friday, February 06, 2009 16:09 To: MbUnit.User <[email protected]> Subject: MbUnit and App.Config appSettings Just getting started here with MBUnit 3x and testing with the following class... [Test] public void NonEmptyAppConfigVars() { Assert.IsNotEmpty(updateTest.cmdTest.string_to_search_for); } ...and using the command line project... namespace updateTest { public class cmdTest { public static readonly string string_to_search_for = ConfigurationSettings.AppSettings["string_to_search_for"]; static void Main(string[] args) { } } } ...But, it doesn't seem that MBUnit reads the 'string_to_search_for' entry and always returns false, when I know the code itself is valid. So, how do I have MBUnit utilize the variables that are in a global/ public context and read from an app.config file? Thanks for any help! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MbUnitUser?hl=en -~----------~----~----~----~------~----~------~--~---
