コード例 #1
0
 public void NoUserToRemoveFoundTest()
 {
     DoSignInToAdmin();
     adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession);
     Assert.AreEqual((int)RemoveUserStatus.NoUserFound, adminServiceSession.RemoveUser(noUserName).Status);
     Assert.IsTrue(MarketException.HasErrorRaised());
 }
コード例 #2
0
 public void RemoveUserInputFailTest()
 {
     DoSignInToAdmin();
     adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession);
     Assert.AreEqual((int)RemoveUserStatus.BadInput, adminServiceSession.RemoveUser(badUserName).Status);
     Assert.IsTrue(MarketException.HasErrorRaised());
 }
コード例 #3
0
 public void NotSystemAdminTest()
 {
     userServiceSession.EnterSystem();
     userServiceSession.SignIn("Arik2", "123");
     adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession);
     Assert.AreEqual((int)RemoveUserStatus.NotSystemAdmin, adminServiceSession.RemoveUser(toRemoveUserNameSoleOwner).Status);
 }
コード例 #4
0
 public void SelfTerminationBlockedTest()
 {
     DoSignInToAdmin();
     adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession);
     Assert.AreEqual((int)RemoveUserStatus.SelfTermination, adminServiceSession.RemoveUser(adminName).Status);
     Assert.IsTrue(MarketException.HasErrorRaised());
 }
コード例 #5
0
 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);
 }
コード例 #6
0
 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);
 }
コード例 #7
0
 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);
 }
コード例 #8
0
 public void DidntLoggedTest()
 {
     userServiceSession.EnterSystem();
     adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession);
     Assert.AreEqual((int)RemoveUserStatus.NotSystemAdmin, adminServiceSession.RemoveUser(toRemoveUserNameSoleOwner).Status);
 }
コード例 #9
0
 public void RemoveUserNotSoleOwnerTest()
 {
     DoSignInToAdmin();
     adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession);
     Assert.AreEqual((int)RemoveUserStatus.Success, adminServiceSession.RemoveUser(toRemoveUserNameNotSoleOwner).Status);
 }