Exemple #1
0
        public void AddAndRemoveStateTest()
        {
            int int1 = repository.AddCatalog("Dune", "Frank Herbert");
            int int2 = repository.AddCatalog("Krol", "Szczepan Twardoch");
            int id1  = repository.AddState(int1, false);
            int id2  = repository.AddState(int2, false);

            Assert.AreEqual(repository.GetAllStateIds().Count, 2);
            repository.RemoveState(id1);
            repository.RemoveState(id2);
            Assert.AreEqual(repository.GetAllStateIds().Count, 0);;
        }
 public void SaveStateMethod()
 {
     Task.Run(() => repository.AddState(int.Parse(CatalogId), bool.Parse(IsBorrowed)));
     Messenger.Default.Send <NotificationMessage>(new NotificationMessage("CloseAddState"));
     Messenger.Default.Send <NotificationMessage>(new NotificationMessage("RefreshState"));
 }