public void TestCreateReaderWithParametres() { int count = rlvm.Users.Count(); ReaderViewModel rvm = new ReaderViewModel(300, "Eliza", "Lech"); rvm.AddUser(); Assert.AreEqual(count, rlvm.Users.Count()); Assert.AreEqual(300, rvm.ID1); Assert.AreEqual("Eliza", rvm.name1); }
public void TestEditUser() { int count = rlvm.Users.Count(); ReaderViewModel rvm = new ReaderViewModel(301, "Chelena", "Kórcewiczuwna"); rvm.AddUser(); rvm.name1 = "Helena"; rvm.surname1 = "Kurcewiczówna"; rvm.EditUser(); Assert.AreEqual("Helena", rvm.name1); }
public void TestCreateReader() { int count = rlvm.Users.Count(); ReaderViewModel rvm = new ReaderViewModel(); rvm.name1 = "Lidia"; rvm.surname1 = "Opala"; rvm.AddUser(); Assert.IsNotNull(rlvm.Users); Assert.AreEqual(count, rlvm.Users.Count()); }
public void TestAddEvent() { BookViewModel bvm = new BookViewModel(200, "Ogniem i mieczem", "Henryk Sienkiewicz", "KWE", 1884); bvm.AddBook(); ReaderViewModel rvm = new ReaderViewModel(2137, "Jan", "Pawłowski"); rvm.AddUser(); EventViewModel evm = new EventViewModel(); evm.book1 = 200; evm.reader1 = 2137; Assert.AreEqual(200, evm.book1); Assert.AreEqual(2137, evm.reader1); }