public ScanStation_WhenMaterialCheckedInTest(DbContextFixture fixture)
        {
            fixture.Seed();
            context         = new LibraryContext(fixture.ContextOptions);
            patronsService  = new PatronsService(context);
            holdingsService = new HoldingsService(context);

            classificationServiceMock = new Mock <IClassificationService>();
            classificationService     = classificationServiceMock.Object;

            somePatronId = patronsService.Create(new Patron {
                Name = "x"
            });

            scanner = new ScanStation(context, 1, classificationService, holdingsService, patronsService);

            scanner.ScanNewMaterial(SomeBarcode, classificationServiceMock);
            scanner.CheckOut(SomeBarcode, somePatronId, now);
            scanner.CompleteCheckout();
            scanner.CheckIn(SomeBarcode, now);
        }
 private void CheckOutNewMaterial()
 {
     scanner.ScanNewMaterial(SomeBarcode, classificationServiceMock);
     scanner.CheckOut(SomeBarcode, savedPatronId, now);
 }
        public void ThrowsWhenCheckingInCheckedOutBookWithoutPatronScan()
        {
            scanner.ScanNewMaterial(SomeBarcode, classificationServiceMock);

            Assert.Throws <CheckoutException>(() => scanner.AcceptBarcode(SomeBarcode));
        }