コード例 #1
0
        public void Initialize()
        {
            classificationService = new StubClassificationService();
            classificationService.AddBook(Classification1, "T1", "A1", "2001");
            classificationService.AddBook(Classification2, "T2", "A2", "2002");

            scanner = new ScanStation(Branch1Id, classificationService);

            holdingService = new HoldingService();
            holdingService.DeleteAllHoldings();

            patronService = new PatronService();
            PatronService.DeleteAllPatrons();

            patronId1 = patronService.Add("Joe");
            patronId2 = patronService.Add("Jane");

            var holding = scanner.AddNewMaterial(Isbn1);

            Assert.That(holding.Barcode, Is.EqualTo(barcode1));
        }
コード例 #2
0
        public void AddData()
        {
            branchService = new BranchService();
            var east = branchService.Add("East");
            var west = branchService.Add("West");

            classificationService = new MasterClassificationService();
            classificationService.DeleteAllBooks();
            classificationService.AddBook("1", "Trial, The", "Kafka, Franz", "1925");
            classificationService.AddBook("2", "Castle, The", "Kafka, Frank", "1926");
            classificationService.AddBook("3", "Catch-22", "Heller, Joseph", "1961");
            classificationService.AddBook("4", "Pale Fire", "Nabokov, Vladimir", "1962");
            classificationService.AddBook("5", "Lolita", "Nabokov, Vladimir", "1955");

            holdingService = new HoldingService();
            holdingService.DeleteAllHoldings();
            holdingService.ClassificationService = classificationService;
            holdingService.Add("1", east);
            holdingService.Add("2", west);
            holdingService.Add("3", east);
            holdingService.Add("4", east);
            holdingService.Add("5", west);
        }
コード例 #3
0
 public void AddBook()
 {
     service.AddBook("QA123", "The Trial", "Kafka, Franz", "1927");
     AssertBook(service.Retrieve("QA123"), "QA123", "The Trial", "Kafka, Franz", "1927");
 }