Пример #1
0
 public void RespondOnDemandRequest()
 {
     GeneralThreadAffineContextHelper.Run(async() =>
     {
         try
         {
             RemoveAllSeekiosInstructions();
             var result = await HttpRequestHelper.GetRequestAsync(string.Format("{0}/{1}/{2}/{3}/{4}/{5}/{6}/{7}/{8}"
                                                                                , URL_RODR
                                                                                , UID_SEEKIOS
                                                                                , BATTERY_LIFE_SEEKIOS
                                                                                , SIGNAL_QUALITY_SEEKIOS
                                                                                , LATITUDE
                                                                                , LONGITUDE
                                                                                , ALTITUDE
                                                                                , ACCURACY
                                                                                , TIMESTAMP));
             if (result == "1")
             {
                 Assert.IsTrue(true);
             }
             else
             {
                 Assert.IsTrue(false);
             }
         }
         catch (Exception)
         {
             Assert.IsTrue(false);
         }
     });
 }
Пример #2
0
 public void SendSOS()
 {
     GeneralThreadAffineContextHelper.Run(async() =>
     {
         try
         {
             SetMode(ModeDefinitions.ModeDontMove);
             var result = await HttpRequestHelper.GetRequestAsync(string.Format("{0}/{1}/{2}/{3}/{4}"
                                                                                , URL_SSOS
                                                                                , UID_SEEKIOS
                                                                                , BATTERY_LIFE_SEEKIOS
                                                                                , SIGNAL_QUALITY_SEEKIOS
                                                                                , TIMESTAMP));
             if (result == "1")
             {
                 Assert.IsTrue(true);
             }
             else
             {
                 Assert.IsTrue(false);
             }
         }
         catch (Exception)
         {
             Assert.IsTrue(false);
         }
     });
 }
Пример #3
0
 public void SendSOSLocationByCellsData()
 {
     GeneralThreadAffineContextHelper.Run(async() =>
     {
         try
         {
             RemoveAllSeekiosInstructions();
             var result = await HttpRequestHelper.GetRequestAsync(string.Format("{0}/{1}/{2}/{3}/{4}/{5}"
                                                                                , URL_SSOSLBCD
                                                                                , UID_SEEKIOS
                                                                                , BATTERY_LIFE_SEEKIOS
                                                                                , SIGNAL_QUALITY_SEEKIOS
                                                                                , CELL_DATA
                                                                                , TIMESTAMP));
             if (result == "1")
             {
                 Assert.IsTrue(true);
             }
             else
             {
                 Assert.IsTrue(false);
             }
         }
         catch (Exception)
         {
             Assert.IsTrue(false);
         }
     });
 }
Пример #4
0
 public void AddNewDontMoveTrackingLocation()
 {
     GeneralThreadAffineContextHelper.Run(async() =>
     {
         try
         {
             SetMode(ModeDefinitions.ModeDontMove);
             var result = await HttpRequestHelper.GetRequestAsync(string.Format("{0}/{1}/{2}/{3}/{4}/{5}/{6}/{7}/{8}"
                                                                                , URL_ANDMTL
                                                                                , UID_SEEKIOS
                                                                                , BATTERY_LIFE_SEEKIOS
                                                                                , SIGNAL_QUALITY_SEEKIOS
                                                                                , LATITUDE
                                                                                , LONGITUDE
                                                                                , ALTITUDE
                                                                                , ACCURACY
                                                                                , TIMESTAMP));
             if (result == "1")
             {
                 Assert.IsTrue(true);
             }
             else
             {
                 Assert.IsTrue(false);
             }
         }
         catch (Exception)
         {
             Assert.IsTrue(false);
         }
     });
 }
Пример #5
0
 public void GetSeekiosInstructions()
 {
     GeneralThreadAffineContextHelper.Run(async() =>
     {
         try
         {
             var result = await HttpRequestHelper.GetRequestAsync(string.Format("{0}/{1}/{2}/{3}/{4}/{5}"
                                                                                , URL_GSI
                                                                                , UID_SEEKIOS
                                                                                , BATTERY_LIFE_SEEKIOS
                                                                                , SIGNAL_QUALITY_SEEKIOS
                                                                                , 0
                                                                                , TIMESTAMP));
             var listOfInstruction = JsonConvert.DeserializeObject <List <string> >(result);
             Assert.IsTrue(true);
         }
         catch (Exception)
         {
             Assert.IsTrue(false);
         }
     });
 }