public void AddUser() { ManagerUsers manager = new ManagerUsers(); User user = new User("mushky7", "kkk", "0586191191", "lod", "02/02/1997", CodeOccupation.Customer); Assert.IsTrue(manager.AddUser(user)); }
public void Login() { ManagerUsers manager = new ManagerUsers(); User user = new User("mushky9", "kkk", "0586191191", "lod", "02/02/1997", CodeOccupation.Customer); manager.AddUser(user); Assert.IsTrue(manager.Login("mushky9", "kkk").UserName == "mushky9"); }
private static BookLib.ItemCollection items;//(because has same name of class in ui) static MainPage() { //The static fields are intilaized once, in the first time which this page is called //and throuhout the runtime of app, the fields are changed by the user users = new ManagerUsers(); items = new BookLib.ItemCollection(); users.AddUser(new User("mushky", "kkk", "0586191191", "lod", "02/02/1997", CodeOccupation.Customer)); users.AddUser(new User("mushky2", "kkk", "0586191191", "lod", "02/02/1997", CodeOccupation.Librarian)); users.AddUser(new User("mushky5", "kkk", "0586191191", "lod", "02/02/1997", CodeOccupation.DiscounManager)); users.AddUser(new User("mushky4", "kkk", "0586191191", "lod", "02/02/1997", CodeOccupation.LibraryManager)); List <Genre> genres = new List <Genre>(); genres.Add(0); items.AddItem(new Book("marko", 3, "sfarim", 56, 2018, "ari", 1, genres)); items.AddItem(new Book("marko", 3, "sfarim", 56, 2018, "ari", 1, genres)); items.AddItem(new Book("marko", 3, "sfarim", 56, 2018, "ari", 1, genres)); items.AddItem(new Book("marko", 3, "sfarim", 56, 2018, "ari", 1, genres)); items.AddItem(new Journal("marko", 3, "sfarim", 56, "04/07/2010", "lll", 0)); items.AddItem(new Journal("marko", 3, "sfarim", 56, "04/07/2010", "lll", 0)); items.AddItem(new Journal("marko", 3, "sfarim", 56, "04/07/2010", "lll", 0)); items.AddItem(new Journal("marko", 3, "sfarim", 56, "04/07/2010", "lll", 0)); items.AddItem(new Journal("marko", 3, "sfarim", 56, "04/07/2010", "lll", 0)); }