public void Setup() { _invoice = new Invoice(); _mocker = new AutoMoqer(); _mocker.GetMock <IDatabase>() .Setup(p => p.GetInvoice(invoiceId)) .Returns(_invoice); _command = _mocker.Create <PrintInvoiceCommand>(); }
public void Setup() { _invoice = new Invoice() { Id = invoiceId, Total = total }; _mocker = new AutoMoqer(); _mocker.GetMock <IDatabase>() .Setup(p => p.GetInvoice(invoiceId)) .Returns(_invoice); _mocker.GetMock <IDateTimeWrapper>() .Setup(p => p.GetNow()) .Returns(new System.DateTime()); _invoicePrinter = _mocker.Create <NewPrintInvoiceCommand>(); }
public void Setup() { _invoice = new Invoice() { Id = invoiceId, Total = total }; _database = new Mock <IDatabase>(); _printer = new Mock <IPrinter>(); _date = new Mock <IDateTimeWrapper>(); _database .Setup(p => p.GetInvoice(invoiceId)) .Returns(_invoice); _date .Setup(p => p.GetNow()) .Returns(new System.DateTime()); _invoicePrinter = new NewPrintInvoiceCommand(_database.Object, _printer.Object, _date.Object); }
public void Setup() { _mocker = new AutoMoqer(); _command = _mocker.Create <PrintInvoiceCommand>(); }