Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private async Task APICall()
        {
            var situation = "";

            foreach (var s in btnStatus)
            {
                if (s == null)
                {
                    situation += "-";
                }
                else
                {
                    situation += s;
                }
            }

            var d = await SmartClient.GetMyRecommendation(situation, "X");

            if (d != null)
            {
                btnStatus[(int)d.recommendation] = "X";
                UpdateButtonStatus((int)d.recommendation);

                if (await WinCheck("X") != false)
                {
                    await Reset();

                    return;
                }
            }
        }
        public static async Task OpenClient(SmartClient client)
        {
            await client.Login();

            await Get.CurrentLender(client);

            await Get.ApplicationByLendercode(client);
        }
        public Logger RunTestAsync(Func <SmartClient, Task> function)
        {
            Logger log = new Logger();

            for (int round = 0; round < Rounds; round++)
            {
                var taskList = new List <Task>();
                for (int iterationNumber = 0; iterationNumber < TestCaseData.Count; iterationNumber++)
                {
                    var iterationData = getIterationData(iterationNumber);
                    var client        = new SmartClient(log, iterationData);
                    taskList.Add(function(client));
                }
                Task.WaitAll(taskList.ToArray());
            }
            return(log);
        }
Ejemplo n.º 4
0
 public static async Task <Response> Application(SmartClient client)
 {
     return(await client.SendAsync(Commands.SaveApplication));
 }
Ejemplo n.º 5
0
        public static async Task SubmitApplicationProcess(SmartClient client)
        {
            await SmartClientHelper.OpenClient(client);

            await Post.NewApplication(client);
        }
Ejemplo n.º 6
0
 private void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
 {
     SmartClient.ChangeProgress(-1);
 }
Ejemplo n.º 7
0
 public void GetMyRecommendationTest()
 {
     var x = SmartClient.GetMyRecommendation("---------", "O").Result;
 }
Ejemplo n.º 8
0
 public static async Task <Response> ApplicationByLendercode(SmartClient client)
 {
     return(await client.SendAsync(Commands.GetApplicationByCode));
 }
Ejemplo n.º 9
0
 public static async Task <Response> CurrentLender(SmartClient client)
 {
     return(await client.SendAsync(Commands.GetCurrentLender));
 }
Ejemplo n.º 10
0
 public static async Task <Response> AllLenders(SmartClient client)
 {
     return(await client.SendAsync(Commands.GetLenders));
 }
Ejemplo n.º 11
0
 public static async Task <Response> ApplicationByFullName(SmartClient client)
 {
     return(await client.SendAsync(Commands.GetApplicationByFullName));
 }