public void AddBook()
        {
            collectionBooks = new CollectionBooks();
            collectionBooks.Path = "temp.pdf";

            collectionBooks.CreateNewBook(10);
            Assert.AreEqual(collectionBooks.ListBooks[0].Notebooks.Count,23);
        }
示例#2
0
 public MainWindow()
 {
     collectionBooks = new CollectionBooks();
     //ДОБАВИТЬ ВОЗМОЖНОСТЬ ВЫБОРА!!!!
     collectionBooks.Dpi = Dpi.ThreeHundred;
     InitializeComponent();
     foreach (string namePrinters in PrinterSettings.InstalledPrinters)
     {
         ComboBox.Items.Add(namePrinters);
     }
 }
        public void GetSetValue()
        {
            collectionBooks = new CollectionBooks();
            collectionBooks.Path = "temp.pdf";

            collectionBooks.CreateNewBook(10);

            collectionBooks.SetBookValue(0);
            collectionBooks.SetNotebookValue(15);
            collectionBooks.SetSideValue("back");

            Assert.AreEqual(collectionBooks.GetNextSideValue(), "front");
            Assert.AreEqual(collectionBooks.GetNextNotebookNumber(),16);
            Assert.AreEqual(collectionBooks.GetNextBookNumber(),0);

            collectionBooks.SetBookValue(0);
            collectionBooks.SetNotebookValue(15);
            collectionBooks.SetSideValue("front");

            Assert.AreEqual(collectionBooks.GetNextSideValue(), "back");
            Assert.AreEqual(collectionBooks.GetNextNotebookNumber(), 15);
            Assert.AreEqual(collectionBooks.GetNextBookNumber(), 0);
        }