Exemplo n.º 1
0
        public void Setup()
        {
            _invoice = new Invoice();
            _mocker  = new AutoMoqer();

            _mocker.GetMock <IDatabase>()
            .Setup(p => p.GetInvoice(invoiceId))
            .Returns(_invoice);
            _command = _mocker.Create <PrintInvoiceCommand>();
        }
Exemplo n.º 2
0
        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>();
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public void Setup()
 {
     _mocker  = new AutoMoqer();
     _command = _mocker.Create <PrintInvoiceCommand>();
 }