annotate 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
rev   line source
275
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
1 using System;
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
2 using System.Collections.Generic;
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
3 using System.IO;
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
4 using System.Linq;
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
5 using System.Text;
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
6 using AltNetHispano.Agendas.Web.Services;
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
7
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
8 namespace Agendas.Web.Tests.Helpers
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
9 {
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
10 public class HttpServerStub: IHttpServer
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
11 {
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
12 public string MapPath(string path)
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
13 {
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
14 var directory = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
15
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
16 #if DEBUG
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
17 if (directory.Parent != null && directory.Parent.Parent != null)
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
18 directory = directory.Parent.Parent;
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
19 #endif
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
20
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
21 return path.Replace("~", directory.FullName);
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
22 }
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
23 }
bf993f99cee3 Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
diff changeset
24 }