view 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 source

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);
		}
	}
}