コード例 #1
0
            public void SecondPatronCanCheckOutSecondCopyOfSameClassification()
            {
                string barcode1Copy2 = Holding.GenerateBarcode(Holding.ClassificationFromBarcode(SomeBarcode), 2);

                ScanNewMaterial(barcode1Copy2);

                var patronId2 = patronRepo.Create(new Patron());

                scanner.AcceptLibraryCard(patronId2);
                scanner.AcceptBarcode(barcode1Copy2);

                Assert.That(GetByBarcode(barcode1Copy2).HeldByPatronId, Is.EqualTo(patronId2));
            }
        public void SecondPatronCanCheckOutSecondCopyOfSameClassification()
        {
            var barcode1Copy2 = Holding.GenerateBarcode(Holding.ClassificationFromBarcode(SomeBarcode), 2);

            scanner.ScanNewMaterial(barcode1Copy2, classificationServiceMock);

            var patronId2 = patronsService.Create(new Patron {
                Name = ""
            });

            scanner.AcceptLibraryCard(patronId2);
            scanner.AcceptBarcode(barcode1Copy2);

            Assert.Equal(patronId2, holdingsService.FindByBarcode(barcode1Copy2).HeldByPatronId);
        }
コード例 #3
0
        public void TwoPatronsDifferentCopySameBook()
        {
            scanner.AddNewMaterial(Isbn1);

            scanner.AcceptLibraryCard(patronId1);
            scanner.AcceptBarcode(barcode1);
            scanner.CompleteCheckout();

            scanner.AcceptLibraryCard(patronId2);
            string barcode1Copy2 = Holding.GenerateBarcode(Classification1, 2);

            scanner.AcceptBarcode(barcode1Copy2);
            scanner.CompleteCheckout();

            AssertHeldBy(barcode1Copy2, patronId2);
        }
コード例 #4
0
 public void GenBarcode()
 {
     Assert.Equal(ExpectedBarcode, Holding.GenerateBarcode("QA234", 3));
 }
コード例 #5
0
 public void GenBarcode()
 {
     Assert.That(Holding.GenerateBarcode("QA234", 3), Is.EqualTo(ExpectedBarcode));
 }
コード例 #6
0
 public void GenerateBarcode()
 {
     Assert.That(Holding.GenerateBarcode("QA234", 3), Is.EqualTo("QA234:3"));
 }