Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Web.Tests/Helpers/HttpServerStub.cs @ 275:bf993f99cee3
Ticket #123: Patrocinadores de las vans.
author | juanjose.montesdeocaarbos |
---|---|
date | Wed, 14 Dec 2011 08:15:44 -0300 |
parents | |
children | 6f5ab71614d4 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Agendas/trunk/src/Agendas.Web.Tests/Helpers/HttpServerStub.cs Wed Dec 14 08:15:44 2011 -0300 @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using AltNetHispano.Agendas.Web.Services; + +namespace Agendas.Web.Tests.Helpers +{ + public class HttpServerStub: IHttpServer + { + public string MapPath(string path) + { + var directory = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory); + +#if DEBUG + if (directory.Parent != null && directory.Parent.Parent != null) + directory = directory.Parent.Parent; +#endif + + return path.Replace("~", directory.FullName); + } + } +}