public void DidntEnterTest() { userServiceRegisteredSession = (UserService)marketSession.GetUserService(); Assert.AreEqual((int)EditCartItemStatus.DidntEnterSystem, userServiceRegisteredSession.EditCartItem("X", "Health Potion", -2, 5.0).Status); Assert.IsTrue(MarketException.HasErrorRaised()); }
public void BuildStore() { MarketDB.Instance.InsertByForce(); market = MarketYard.Instance; userService = market.GetUserService(); userService2 = market.GetUserService(); MarketYard.SetDateTime(DateTime.Parse("14/04/2018")); }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = (UserService)marketSession.GetUserService(); userServiceSession2 = (UserService)marketSession.GetUserService(); userServiceSession.EnterSystem(); userServiceSession2.EnterSystem(); userSellerHarmony = new UserSellerHarmony(ref userServiceSession, store); }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = (UserService)marketSession.GetUserService(); userServiceSession2 = (UserService)marketSession.GetUserService(); userServiceSession.EnterSystem(); userServiceSession2.EnterSystem(); storeServiceSession = (StoreManagementService)marketSession.GetStoreManagementService(userServiceSession, store); }
public void CantLoginToDeletedUserTest() { deletedUserSession = (UserService)marketSession.GetUserService(); deletedUserSession.EnterSystem(); deletedUserSession.SignUp("DeleteMe", "no-where", "123", "12345678"); ToSignIn(adminName, adminPass); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); adminServiceSession.RemoveUser("DeleteMe"); deletedUserSession2 = (UserService)marketSession.GetUserService(); deletedUserSession2.EnterSystem(); Assert.AreEqual((int)SignInStatus.NoUserFound, deletedUserSession2.SignIn("DeleteMe", "123").Status); }
public int Get() { var userService = marketSession.GetUserService(); var answer = userService.EnterSystem(); if (answer.Status != Success) { return(0); } var id = Convert.ToInt32(answer.ReportList[0]); users.Add(id, userService); return(id); }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = (UserService)marketSession.GetUserService(); userServiceSession2 = (UserService)marketSession.GetUserService(); userServiceSession3 = (UserService)marketSession.GetUserService(); userServiceSession2.EnterSystem(); userServiceSession3.EnterSystem(); userServiceSession2.SignIn(sysadmin, pass); sysadminSession = marketSession.GetSystemAdminService(userServiceSession2); userServiceSession.EnterSystem(); orderServiceSession = (OrderService)marketSession.GetOrderService(ref userServiceSession); storeServiceSession = (StoreShoppingService)marketSession.GetStoreShoppingService(ref userServiceSession); }
public void BuildInitialize() { MarketDB.Instance.InsertByForce(); market = MarketYard.Instance; userService = market.GetUserService(); storeService = market.GetStoreShoppingService(ref userService); }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = marketSession.GetUserService(); marketSession.GetStorePolicyManager().SyncWithDB(); }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = (UserService) marketSession.GetUserService(); userServiceSession2 = null; }
public void BuildStore() { MarketDB.Instance.InsertByForce(); market = MarketYard.Instance; handler = StoreDL.Instance; userService = market.GetUserService(); }
public void MarketBuilder() { marketSession = MarketYard.Instance; userServiceSession = (UserService)marketSession.GetUserService(); userServiceSession.EnterSystem(); orderSyncherHarmony = new OrderSyncherHarmony(); }
public void BuildStore() { MarketDB.Instance.InsertByForce(); market = MarketYard.Instance; userService = market.GetUserService(); MarketYard.SetDateTime(new DateTime(2018, 4, 14)); }
private UserService DoEnter() { UserService userService = (UserService)marketSession.GetUserService(); userService.EnterSystem(); return(userService); }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = (UserService)marketSession.GetUserService(); userShopperHarmony = new UserShopperHarmony(ref userServiceSession); storeServiceSession = (StoreShoppingService)marketSession.GetStoreShoppingService(ref userServiceSession); }
public async Task EnterSystem(string socketId) { var userService = marketSession.GetUserService(); var id = Convert.ToInt32(userService.EnterSystem().ReportList[0]); Users.Add(id, userService); await InvokeClientMethodAsync(socketId, "IdentifyClient", new object[] { id }); }
public void MarketBuilder() { MarketException.SetDB(MarketBackUpDB.Instance); MarketBackUpDB.Instance.CleanByForce(); MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = marketSession.GetUserService(); userServiceSession.EnterSystem(); }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = (UserService)marketSession.GetUserService(); userServiceSession.EnterSystem(); orderServiceSession = (OrderService)marketSession.GetOrderService(ref userServiceSession); userBuyerHarmony = new UserBuyerHarmony(ref userServiceSession); }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = (UserService)marketSession.GetUserService(); userServiceSession.EnterSystem(); orderServiceSession = (OrderService)marketSession.GetOrderService(ref userServiceSession); storeServiceSession = StockSyncher.Instance; storeSyncherHarmony = new StoresSyncherHarmony(); }
public void MarketBuilder() { MarketLog.SetDB(MarketBackUpDB.Instance); MarketBackUpDB.Instance.CleanByForce(); MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = marketSession.GetUserService(); userServiceSession.EnterSystem(); userServiceSession.SignIn("Arik1", "123"); }
public void BuildInitialize() { MarketDB.Instance.InsertByForce(); market = MarketYard.Instance; userService = market.GetUserService(); userService.EnterSystem(); storeService = market.GetStoreShoppingService(ref userService); p1 = " name: BOX base price: 100 description: this is a plastic box Discount: {type is: hidden} Purchase Way: Immediate Quantity: 5 Store: X"; p2 = " name: Fraid Egg base price: 10 description: yami Discount: {none} Purchase Way: Immediate Quantity: 10 Store: T"; }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceGuestSession = (UserService)marketSession.GetUserService(); userServiceGuestSession.EnterSystem(); userServiceRegisteredSession = null; expected = new List <CartItem>(); item1 = new CartItem("Health Potion", null, "X", 1, 5.0); item2 = new CartItem("Health Potion", null, "Y", 2, 0.5); }
public void MarketBuilder() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userServiceSession = (UserService)marketSession.GetUserService(); userAdminHarmony = null; adminServiceSession = null; deletedUserSession = null; deletedUserSession2 = null; storeShoppingService = null; orderService = null; }
public void SignUpWithExistedName() { Assert.IsFalse(MarketException.HasErrorRaised()); DoSignUp("MaorRegister10", "Here 3", "123", "12345678"); Assert.IsFalse(MarketException.HasErrorRaised()); userServiceSession2 = (UserService)marketSession.GetUserService(); userServiceSession2.EnterSystem(); Assert.IsFalse(MarketException.HasErrorRaised()); Assert.AreEqual((int)SignUpStatus.TakenName, userServiceSession2.SignUp("MaorRegister10", "Here 3", "123", "12345678").Status); Assert.IsTrue(MarketException.HasErrorRaised()); }
public void BuildStore() { MarketDB.Instance.InsertByForce(); marketSession = MarketYard.Instance; userService = marketSession.GetUserService(); userService.EnterSystem(); expectedT = new List <string> { "Store: T Promoter: Arik1 Promoted: Arik1 Permissions: StoreOwner Date: 01/01/2018 Description: T has been opened", "Store: T Promoter: Arik1 Promoted: CJ Permissions: StoreOwner Date: 01/01/2018 Description: Regular promotion" }; }
public void MarketBuilder() { publisherMock = new Mock <IPublisher>(); marketDbMocker = new Mock <IMarketBackUpDB>(); MarketException.SetDB(marketDbMocker.Object); MarketLog.SetDB(marketDbMocker.Object); userBuyerMocker = new Mock <IUserBuyer>(); SupplyService.Instance.FixExternal(); PaymentService.Instance.FixExternal(); marketSession = MarketYard.Instance; userServiceSession = (UserService)marketSession.GetUserService(); userServiceSession.EnterSystem(); slave = new PurchaseItemSlave(userBuyerMocker.Object, new StoresSyncherHarmony(), OrderDL.Instance, publisherMock.Object, marketSession.GetPolicyChecker()); InitPolicies(); }
public void BuildOrderPool() { MarketDB.Instance.InsertByForce(); market = MarketYard.Instance; userService = market.GetUserService(); orderService = (OrderService)market.GetOrderService(ref userService); IUserBuyer buyer = new UserBuyerHarmony(ref userService); slave1 = new PurchaseItemSlave(buyer, new StoresSyncherHarmony(), OrderDL.Instance, Publisher.Instance, market.GetPolicyChecker()); slave2 = new PurchaseEverythingSlave(buyer, new StoresSyncherHarmony(), OrderDL.Instance, Publisher.Instance, market.GetPolicyChecker()); orderService.GiveDetails("Big Smoke", "Grove Street", "54238521"); item1 = new OrderItem("Cluckin Bell", null, "#9", 5.00, 2); item2 = new OrderItem("Cluckin Bell", null, "#9 Large", 7.00, 1); item3 = new OrderItem("Cluckin Bell", null, "#6 Extra Dip", 8.50, 1); }
private void DoSignIn(string name, string password) { userServiceSignInSession = (UserService)marketSession.GetUserService(); userServiceSignInSession.EnterSystem(); Assert.AreEqual((int)SignInStatus.Success, userServiceSignInSession.SignIn(name, password).Status); }
public RealBridge() { var marketSession = new MarketYard(); userServie = marketSession.GetUserService(); }
public void BuildStore() { MarketDB.Instance.InsertByForce(); _market = MarketYard.Instance; _userService = _market.GetUserService(); }