I am trying to write meaningful tests, using MSTest for the following
method:

                public bool CheckDateFormat()
                {
                        return
(String.Compare(ConfigurationManager.AppSettings[Constants.CultureToUse],
Constants.UK, true) == 0);
                }

To do so, I want to check the expected path (with the value 'en-GB'
returned from app.config) as well as negative paths where the value is
different within the app.config file or where no value is present.

I do not want to have to dynamically add, remove or modify values
within the app.config file, but hoped that I could achieve my tests by
mocking ConfigurationManager. However, since the method is effectively
a 'black box' and encapsulates the use of ConfigurationManager, how
can I write MSTest code to do this?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" 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/rhinomocks?hl=en.

Reply via email to