Beispiel #1
0
 public static IWebApiConnector LoginAdministrator(string firstName = EvoqConstants.AdministratorFirstName, string lastName = EvoqConstants.AdministratorLastName, string url = null)
 {
     UserController.CreateAdministratorUser(firstName, lastName);
     return(WebApiTestHelper.LoginUser(firstName + "." + lastName));
 }
Beispiel #2
0
 /// <summary>
 /// Creates a Content Manager and Logs that user in as well.
 /// Password used is same as that for Host. Existing user is used if it's already present.
 /// </summary>
 /// <returns>IWebApiConnector object to perform more actions</returns>
 public static IWebApiConnector LoginContentManager(string firstName = EvoqConstants.ConMgrFirstName, string lastName = EvoqConstants.ConMgrLastName, string url = null)
 {
     UserController.CreateContentManagerUser(firstName, lastName);
     return(WebApiTestHelper.LoginUser(firstName + "." + lastName));
 }
Beispiel #3
0
 /// <summary>
 /// Creates a Comunity Manager and Logs that user in as well.
 /// Password used is same as that for Host. Existing user is used if it's already present.
 /// </summary>
 /// <returns>IWebApiConnector object to perform more actions</returns>
 public static IWebApiConnector LoginCommunityManager(string firstName = EvoqConstants.CmxFirstName, string lastName = EvoqConstants.CmxLastName, string url = null)
 {
     UserController.CreateCommunityManagerUser(firstName, lastName);
     return(WebApiTestHelper.LoginRegisteredUser(firstName, lastName));
 }
Beispiel #4
0
 /// <summary>
 /// Provides a list of Connectors for AnonymousUsers and Registered Users
 /// </summary>
 /// <remarks>This list should be used for doing security tests on API that are available for more privileged users</remarks>
 public static IList <IWebApiConnector> AnonymousAndRuLogins()
 {
     return(new List <IWebApiConnector> {
         LoginRegisteredUser(), WebApiTestHelper.GetAnnonymousConnector()
     });
 }
Beispiel #5
0
 public static IWebApiConnector LoginRegisteredUser(string firstName = IntegrationConstants.RuFirstName, string lastName = IntegrationConstants.RuLastName, string url = null)
 {
     UserController.CreateRegisteredUser(firstName, lastName);
     return(WebApiTestHelper.LoginRegisteredUser(firstName, lastName));
 }
Beispiel #6
0
 public static IWebApiConnector LoginHost()
 {
     return(WebApiTestHelper.LoginUser(AppConfigHelper.HostUserName));
 }