public CheckOutControllerTest(DbContextFixture fixture) { fixture.Seed(); var context = new LibraryContext(fixture.ContextOptions); controller = new CheckOutController(context, checkOutServiceMock.Object, new BranchesService(context)); checkOutViewModel = new CheckOutViewModel { Barcode = "QA123:1", PatronId = 1 }; }
public ScanStation_WhenNothingCheckedOutTest(DbContextFixture fixture) { fixture.Seed(); context = new LibraryContext(fixture.ContextOptions); patronsService = new PatronsService(context); holdingsService = new HoldingsService(context); classificationServiceMock = new Mock <IClassificationService>(); classificationService = classificationServiceMock.Object; AlwaysReturnBookMaterial(classificationServiceMock); somePatronId = patronsService.Create(new Patron { Name = "x" }); scanner = new ScanStation(context, 1, classificationService, new HoldingsService(context), new PatronsService(context)); }
public ScanStation_WhenNewMaterialCheckedOutTest(DbContextFixture fixture) { fixture.Seed(); context = new LibraryContext(fixture.ContextOptions); holdingsService = new HoldingsService(context); patronsService = new PatronsService(context); classificationServiceMock = new Mock <IClassificationService>(); classificationService = classificationServiceMock.Object; scanner = new ScanStation(context, 1, classificationService, holdingsService, patronsService); savedPatronId = patronsService.Create(new Patron { Name = "" }); CheckOutNewMaterial(); }
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); }
public HoldingRetrievalValidatorTest(DbContextFixture fixture) { fixture.Seed(); context = new LibraryContext(fixture.ContextOptions); }
public CheckInServiceTest(DbContextFixture fixture) { fixture.Seed(); context = new LibraryContext(fixture.ContextOptions); }
public ExistsTest(DbContextFixture fixture) { fixture.Seed(); context = new LibraryContext(fixture.ContextOptions); }
public DbSetExtensionsTest(DbContextFixture fixture) { fixture.Seed(); context = new LibraryContext(fixture.ContextOptions); }
public HoldingsControllerTest(DbContextFixture fixture) { fixture.Seed(); context = new LibraryContext(fixture.ContextOptions); controller = new HoldingsController(context); }
public BranchesServiceTest(DbContextFixture fixture) { fixture.Seed(); context = new LibraryContext(fixture.ContextOptions); branchesService = new BranchesService(context); }
public PatronsServiceTest(DbContextFixture fixture) { fixture.Seed(); context = new LibraryContext(fixture.ContextOptions); service = new PatronsService(context); }