コード例 #1
0
            public void ShouldCreatePDFFile()
            {
                using (var app = new App(testing: true)) {
                  var printer = new FakePrinter();
                  var ctrl = new GateInController(printer, app);
                  var result = ctrl.CreateTicket("1234");

                  Assert.Equal(true, printer.HasPrinted);
                }
            }
コード例 #2
0
            public void ShouldReturnsView()
            {
                using (var app = new App(testing: true)) {
                  var ctrl = new GateInController(null, app);

                  var r = ctrl.Index();

                  Assert.NotNull(r);
                  Assert.IsType<ViewResult>(r);
                }
            }
コード例 #3
0
            public void ShouldCreatePdfFile()
            {
                using (var app = new App(testing: true)) {

                  var printer = new FakePrinter();
                  var ctrl = new GateInController(printer, app);

                  ctrl.CreateTicket("000");

                  Assert.True(printer.HasPrinted);
                }
            }