コード例 #1
0
        public async Task PizzaOrderServiceOrderFakeTest()
        {
            // mock new Mock<ComplianceDbContext>();

            var loggingService = new FakeLoggingService();

            //db context requires a bit more effort to fake so let's abandon for now
            Assert.Inconclusive();

            using (var context = new MyPizzaDbContext())
            {
                var queueService        = new StoreQueueService();
                var paymentService      = new PaymentService();
                var notificationService = new OrderNotificationService();

                var service = new PizzaOrderService(
                    context,
                    paymentService,
                    queueService,
                    notificationService,
                    loggingService);
                var orderId = await service.OrderMenuItemAsync(1);

                Assert.IsTrue(orderId != 0);
            }
        }
コード例 #2
0
 public RunScriptTests()
 {
     _loggingService = new FakeLoggingService();
     _runScript      = new RunScript(_loggingService);
 }
コード例 #3
0
 public ExitTests()
 {
     _loggingService = new FakeLoggingService();
     _exit           = new Exit(_loggingService);
 }