public static void AddLoginExceptionExpectation(IWebRequestHelper webRequestHelper, Exception exceptionToThrow)
 {
     Expect.Call(delegate { webRequestHelper.Login(null); })
     .IgnoreArguments()
     .Constraints(Is.TypeOf <Configuration>())
     .Throw(exceptionToThrow);
 }
 public string LoginHttp(IWebRequestHelper webRequestHelper)
 {
     try
     {
         webRequestHelper.Login(_config);
         return("success");
     }
     catch (ArgumentException ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
 public string LoginAndTest(IWebRequestHelper webRequestHelper)
 {
     try
     {
         webRequestHelper.Login(_config);
         webRequestHelper.Test();
         return("success");
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
 public static void AddLoginExpectation(IWebRequestHelper webRequestHelper, Configuration config)
 {
     Expect.Call(() => webRequestHelper.Login(config))
     .IgnoreArguments()
     .Constraints(Is.TypeOf <Configuration>());
 }