Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Created April 20, 2010 18:09
Show Gist options
  • Save jfromaniello/372842 to your computer and use it in GitHub Desktop.
Save jfromaniello/372842 to your computer and use it in GitHub Desktop.
[Test]
public void carga_puntos_de_venta_al_inicializar()
{
var puntoVenta = new PuntoVenta();
var view = new Mock<IFacturaPedidoEditarView>();
view.SetupAllProperties();
var presenter = new FacturaPedidoEditarPresenter(
view.Object,
new DaoFactoryStub()
.PushDao(new DaoStub<FacturaPedido>())
.PushDao(new DaoStub<CuentaCorriente>())
.PushDao(new DaoStub<PuntoVenta>().PushEntities(puntoVenta)));
presenter.Initialize();
view.Object.PuntosDeVenta.Should().Contain(puntoVenta);
}
public override void Initialize()
{
view.FormasDePago = new FormasDePago().OrderBy(f => f.Nombre);
view.CuentasCorrientes = daoCuentaCorriente.RetrieveAll().OrderBy(c => c.RazonSocial).ToList();
view.PuntosDeVenta = daoPuntosVenta.RetrieveAll().OrderBy(p => p.Nombre).ToList();
base.Initialize();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment