public void logOut() { ServiceLayer.System s1 = ServiceLayer.System.initialize("Admin", "password123"); s1.register("Nati", "123456"); s1.login("Nati", "123456"); bool ans = s1.logout("Nati"); Assert.AreEqual(ans, true); bool ans2 = s1.logout("Nati"); Assert.AreEqual(ans2, false); ServiceLayer.System.Reset(); }
public void storeManagerTriesToMakeACommand() { ServiceLayer.System s1 = ServiceLayer.System.initialize("Admin", "password123"); s1.register("Nati", "123456"); s1.register("Ben", "123"); s1.login("Nati", "123456"); s1.openStore("storename", "Nati"); s1.addMangerToStore("storename", "Ben"); //TODO add a command for the new manager(Ben) to do s1.logout("Nati"); }
public void openStore() { ServiceLayer.System s1 = ServiceLayer.System.initialize("Admin", "password123"); s1.register("Nati", "123456"); s1.login("Nati", "123456"); bool ans = s1.openStore("storeName", "Nati"); Assert.AreEqual(ans, true); //If the name of the store is already exist bool ans2 = s1.openStore("storeName", "Nati"); Assert.AreEqual(ans2, false); //If The user is not logged in return false s1.logout("Nati"); bool ans3 = s1.openStore("storeName2", "Nati"); Assert.AreEqual(ans3, false); ServiceLayer.System.Reset(); }