Sunday, July 24, 2011

Setting the Date for Testing

I've added the following code to the remoting sink on the remoting server side to enable us to set the date on the server for automated ui testing.
if (!string.IsNullOrWhiteSpace (ConfigurationManager.AppSettings["Date"]))
{
    ObjectFactory.GetInstance<IDataContext> ().ServiceHome.DateService.SetDate (Utils.ParseDateTime (ConfigurationManager.AppSettings["Date"]));
}
Please make sure this setting never gets set on the production environment.

No comments:

Post a Comment