view Agendas/trunk/src/Agendas.Web.Tests/Helpers/HttpServerStub.cs @ 278:6f5ab71614d4

#125: ABM de patrocinadores.
author juanjose.montesdeocaarbos
date Wed, 21 Dec 2011 08:47:05 -0300
parents bf993f99cee3
children
line wrap: on
line source

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using AltNetHispano.Agendas.Web.Services;

namespace Agendas.Web.Tests.Helpers
{
	public class HttpServerStub : HttpServerUtilityBase
	{
		public override 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);
		}
	}
}