public void LateCheckInResultsInFine() { scanner.CompleteCheckout(); const int daysLate = 2; scanner.CheckIn(SomeBarcode, DaysPastDueDate(SomeBarcode, now, daysLate, classificationService)); Assert.Equal(RetrievePolicy(SomeBarcode, classificationService).FineAmount(daysLate), patronsService.FindById(savedPatronId).Balance); }
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); }