public void NoUserToRemoveFoundTest() { DoSignInToAdmin(); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); Assert.AreEqual((int)RemoveUserStatus.NoUserFound, adminServiceSession.RemoveUser(noUserName).Status); Assert.IsTrue(MarketException.HasErrorRaised()); }
public void RemoveUserInputFailTest() { DoSignInToAdmin(); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); Assert.AreEqual((int)RemoveUserStatus.BadInput, adminServiceSession.RemoveUser(badUserName).Status); Assert.IsTrue(MarketException.HasErrorRaised()); }
public void NotSystemAdminTest() { userServiceSession.EnterSystem(); userServiceSession.SignIn("Arik2", "123"); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); Assert.AreEqual((int)RemoveUserStatus.NotSystemAdmin, adminServiceSession.RemoveUser(toRemoveUserNameSoleOwner).Status); }
public void SelfTerminationBlockedTest() { DoSignInToAdmin(); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); Assert.AreEqual((int)RemoveUserStatus.SelfTermination, adminServiceSession.RemoveUser(adminName).Status); Assert.IsTrue(MarketException.HasErrorRaised()); }
public void StoreClosedUponUserRemovalTest() { ToSignIn(adminName, adminPass); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); Assert.AreEqual((int)RemoveUserStatus.Success, adminServiceSession.RemoveUser(soleOwnerName).Status); storeShoppingService = marketSession.GetStoreShoppingService(ref userServiceSession); Assert.AreEqual((int)StoreEnum.StoreNotExists, storeShoppingService.AddProductToCart("Y", "BOX", 3).Status); }
public void SignUpWithDeletedUserDataTest() { ToSignIn(adminName, adminPass); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); adminServiceSession.RemoveUser(soleOwnerName); deletedUserSession2 = (UserService)marketSession.GetUserService(); deletedUserSession2.EnterSystem(); Assert.AreEqual((int)SignUpStatus.Success, deletedUserSession2.SignUp(soleOwnerName, "no-where", soleOwnerPass, "12345678").Status); }
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 void DidntLoggedTest() { userServiceSession.EnterSystem(); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); Assert.AreEqual((int)RemoveUserStatus.NotSystemAdmin, adminServiceSession.RemoveUser(toRemoveUserNameSoleOwner).Status); }
public void RemoveUserNotSoleOwnerTest() { DoSignInToAdmin(); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); Assert.AreEqual((int)RemoveUserStatus.Success, adminServiceSession.RemoveUser(toRemoveUserNameNotSoleOwner).Status); }