public void TestInitialize() { MarketSystem.initTestWitOutRead(); session1 = new Session(); string pass = DomainBridge.getInstance().encryptPassword("123"); session1.register("eyal", pass); session2 = new Session(); session2.register("bar", pass); session3 = new Session(); session3.register("etay", pass); session1.login("eyal", "123"); session2.login("bar", "123"); session3.login("etay", "123"); store = session1.createStore("mystore", "a store"); sr = session1.getSubscribedUser().getStoreRole(store); p = new Product("product", "cat", 10, 0, 10, store); p1 = new Product("product1", "cat", 10, 0, 10, store); per = new Permissions(true, true, true); }
public void init() { MarketSystem.initTestWitOutRead(); //DBSubscribedUser dbsubscribedUser = DBSubscribedUser.getInstance(); //dbsubscribedUser.initTests(); //DBStore.getInstance().cleanDB(); }
public void TestInitialize() { MarketSystem.initTestWitOutRead(); s = new Store("store", "store"); DBStore.getInstance().addStore(s); su = new SubscribedUser("u", "u", new ShoppingBasket()); sr = new StoreOwner(null, su, s); }
public void initial() { MarketSystem.initTestWitOutRead(); //DBProduct.getInstance().initTests(); //DBProduct.getInstance().initTests(); //DBStore.getInstance().initTests(); store = new Store("store1", "games store"); DBStore.getInstance().addStore(store); cart = new ShoppingCart(store.getStoreID()); }
public void TestInitialize() { MarketSystem.initTestWitOutRead(); session1 = userService.startSession(); userService.register(session1, "anna", "banana"); //first owner userService.login(session1, "anna", "banana"); storeID = storeService.addStore("myStore", "the best store ever", session1); p = storeService.addProduct("pizza", "food", 40, 0, 10, storeID, session1); p1 = storeService.addProduct("fries", "food", 20, 2, 10, storeID, session1); p2 = storeService.addProduct("coca cola", "drinks", 8, 2, 10, storeID, session1); p3 = storeService.addProduct("ketchup", "sauces", 2, 0, 10, storeID, session1); p4 = storeService.addProduct("coca cola zero", "drinks", 8, 4, 10, storeID, session1); }
public void init() { MarketSystem.initTestWitOutRead(); //storeDB.initTests(); //productDB.initTests(); //DBSubscribedUser.getInstance().initTests(); session1 = new Session(); string pass = DomainBridge.getInstance().encryptPassword("123"); session1.register("eyal", pass); session2 = new Session(); session2.register("bar", pass); session3 = new Session(); session3.register("etay", pass); session1.login("eyal", "123"); session2.login("bar", "123"); session3.login("etay", "123"); store = session1.createStore("mystore", "a store"); per = new Permissions(true, true, true); per2 = new Permissions(false, false, false); sr = session1.getSubscribedUser().getStoreRole(store); sr.addManager(session2.getSubscribedUser(), per); sr.addManager(session3.getSubscribedUser(), per2); sr1 = session2.getSubscribedUser().getStoreRole(store); sr2 = session3.getSubscribedUser().getStoreRole(store); p = new Product("product", "cat", 10, 0, 10, store); p1 = new Product("product1", "cat", 10, 0, 10, store); }
public void TestInitialize() { MarketSystem.initTestWitOutRead(); }
public void init() { MarketSystem.initTestWitOutRead(); }