diff Agendas/trunk/src/Agendas.Blog/Impl/PostWriterFactory.cs @ 99:3027c64344bd

agregado de llamadas a web service para crear posts en el blog de la comunidad agregado de tests sobre el publicador de blogs agregado de tests sobre el adapter del web service
author jorge.rowies
date Sat, 04 Jun 2011 22:33:05 -0300
parents a300394dbabe
children
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Blog/Impl/PostWriterFactory.cs	Sat Jun 04 14:10:21 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Blog/Impl/PostWriterFactory.cs	Sat Jun 04 22:33:05 2011 -0300
@@ -4,16 +4,23 @@
 {
   public class PostWriterFactory : IPostWriterFactory
   {
+    private readonly IPostWriterWebService _postWriterWebService;
+
+    public PostWriterFactory(IPostWriterWebService postWriterWebService)
+    {
+      _postWriterWebService = postWriterWebService;
+    }
+
     public IPostWriter GetPostWriter(Accion accion)
     {
       switch (accion)
       {
         case Accion.Agendar:
-          return new AgendarReunionPostWriter();
+          return new AgendarReunionPostWriter(_postWriterWebService);
         case Accion.Publicar:
-          return new PublicarReunionPostWriter();
+          return new PublicarReunionPostWriter(_postWriterWebService);
         default:
-          return new NullObjectPostWriter();
+          return new NullObjectPostWriter(_postWriterWebService);
       }
     }
   }