Ejemplo n.º 1
0
        public void MiniEmeTest_BookCourseByUserId()
        {
            MiniEmeClient emeClient = new MiniEmeClient();
            var param = JsonHelper.ToJson(new BookCourseParamModel()
            {
                //UserId = 18160,
                //ArrangeCourseId = 1392763,
                //IsForce = false,
                //BookUserId = 18160,
                //ProductLevelId = 17,
                //ContractLevelId = 397685,
                //BookSource = 101
                // UserId = 15466,

                StudentId = 17463,
                ArrangeCourseId = 1392793,
                BookUserId = 15466,
                ProductLevelId = 15,
                ContractLevelId = 127096,
                BookSource = 100
            });
            var result = emeClient.CreateBookCourseByUserId(param);
            var jsonData = JsonHelper.FromJson<Dictionary<string, string>>(result);
            Assert.AreEqual(jsonData["ResultCode"], "000000");
            emeClient.Close();
        }
Ejemplo n.º 2
0
 public void MiniEmeTest_BusiEMEGetSABranchCourseSchedule()
 {
     MiniEmeClient emeClient = new MiniEmeClient(); // V3EME号:137799登录账号:reya_zy中文名:邹悦英文名:Reya
     var param = "{\"UserId\":\"13779\",\"BeginTime\":\"2015-06-08\",\"EndTime\":\"2015-06-14\"}"; ;
     var result = emeClient.GetSABranchCourseSchedule(param);
     var jsonData = JsonHelper.FromJson<List<object>>(result);
     Assert.AreEqual(jsonData.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 3
0
 public void MiniEmeTest_UnBookCourseByUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new UnbookCourseModel()
     {
         BookRecordId = 8247243,
         UserId = 146865,
         IsForce = true,
         UnBookReason = "Test Create",
         UnBookUserId = 146865,
     });
     var result = emeClient.UnBookCourseByUserId(param);
     var jsonData = JsonHelper.FromJson<Dictionary<string, string>>(result);
     Assert.AreEqual(jsonData["ResultCode"], "000000");
     emeClient.Close();
 }
Ejemplo n.º 4
0
 public void MiniEmeTest_NewCreateWebchatBookCourseByUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var jsonParam = JsonHelper.ToJson(new BookCourseParamModel()
     {
         UserId = 146968,
         ArrangeCourseId = 1392765,
         BookUserId = 146968,
         ProductLevelId = 1,
         ContractLevelId = 497952,
         BookSource = 101
     });
     var result = emeClient.BookCourseByUserId(jsonParam);
     Assert.AreEqual(result, 100);
     emeClient.Close();
 }
Ejemplo n.º 5
0
 public void MiniEmeTest_NewBookCourseByUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new BookCourseParamModel()
     {
         UserId = 146296,
         ArrangeCourseId = 1392491,//1392635,
         IsForce = false,
         BookUserId = 146296,
         ProductLevelId = 2,
         ContractLevelId = 495270,
     });
     var result = emeClient.BookCourseByUserId(param);
     var jsonData = JsonHelper.FromJson<Dictionary<string, string>>(result);
     Assert.AreEqual(jsonData["ResultCode"], "000000");
     emeClient.Close();
 }
Ejemplo n.º 6
0
 public void MiniEmeTest_GetWaitingCourseListByUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new WaitingCourseParamModel() { UserId = 134064, PageIndex = 1, PageSize = 10 });  //136594 //136072
     var result = emeClient.GetWaitingCourseListByUserId(param);
     var jsonData = JsonHelper.FromJson<PageData<List<StudentBookedRecordModel>>>(result);
     // var eq = Assert.Equals(jsonData.UserId, 136072);
     Assert.AreEqual(jsonData.Data.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 7
0
 public void MiniEmeTest_GetUserInfoModelByPhone()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var jsonText = "{\"Mobile\":\"13701405634\",\"UserId\":\"122619\"}";//"{\"Mobile\":\"15999683801\",\"UserId\":\"0\"}";   //  15999683801
     var result = emeClient.GetUserInfoByPhone(jsonText);
     var jsonData = JsonHelper.FromJson<UserInfoByPhoneModel>(result);
     // var eq = Assert.Equals(jsonData.UserId, 136072);
     Assert.AreEqual(jsonData.MobilePhone, "13701405634");
     emeClient.Close();
 }
Ejemplo n.º 8
0
 public void MiniEmeTest_GetStudyProgressList()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new StudyProgressParamModel() { UserId = 136072, ProductLevelId = 1 });
     var result = emeClient.GetStudyProgressList(param);
     var jsonData = JsonHelper.FromJson<List<object>>(result);
     Assert.AreEqual(jsonData.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 9
0
        public void MiniEmeTest_CreateCourseCheckIn()
        {
            MiniEmeClient emeClient = new MiniEmeClient();
            var jsonParam = "[{\"BookRecordId\":\"8247170\",\"CheckinFlag\":\"true\"}]";

            //    JsonHelper.ToJson(new List<TeacherCourseRateParamModel>
            //{
            //    new TeacherCourseRateParamModel(){
            //    BookRecordId = 8002056,
            //    IsNoShow = true,

            //    },
            //    //new TeacherCourseRateParamModel(){
            //    //BookRecordId = 7123477,
            //    //IsNoShow = false,
            //    //TotalScore = 3,
            //    //ItemsInfo = "4|3",
            //    //Comments = "test by api",
            //    //CreateBy = 138513
            //    //}
            //});

            var result = emeClient.CreateCourseCheckIn(jsonParam);
            var jsonData = JsonHelper.FromJson<Dictionary<string, string>>(result);
            Assert.AreEqual(jsonData["ResultCode"], "000000");
            emeClient.Close();
        }
Ejemplo n.º 10
0
 public void MiniEmeTest_BusiEMESAStudentsStudyProgress()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new SAStudentStudyStatParamModel
     {
         SaUserId = 29188,
         SearchDate = DateTime.Parse("2015-10-20 23:59:59.000"),
         ProductSCode = "4D",
         RateCourses = (decimal)4.2,
         CourseNumFirstIndex = (decimal)1.2,
         CourseNumLastIndex = 2,
         PageIndex = 1,
         PageSize = 20
     });
     var result = emeClient.SAStudentsStudyProgress(param);
     var jsonData = JsonHelper.FromJson<PageData<List<object>>>(result);
     Assert.AreEqual(jsonData.Data.Count > 3, true);
     emeClient.Close();
 }
Ejemplo n.º 11
0
 public void MiniEmeTest_BusiEMEGetStudentListByUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new UserStudentListParamModel
     {
         UserId = 30688,
         IsUpgrade = true,
         UpgradeLastCourses = 4,
         IsContractOver = true,
         ContractOverMonths = 1,
         PageIndex = 1,
         PageSize = 20
     });
     var result = emeClient.GetStudentListByUserId(param);
     var jsonData = JsonHelper.FromJson<PageData<List<BranchStudentInfoModel>>>(result);
     Assert.AreEqual(jsonData.Data.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 12
0
 public void MiniEmeTest_BusiEMEGetStudentListByCenterId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new BranchStudentInfoParamModel { CenterId = 8, PageIndex = 1, PageSize = 20 });
     var result = emeClient.GetStudentListByCenterId(param);
     var jsonData = JsonHelper.FromJson<PageData<List<BranchStudentInfoModel>>>(result);
     Assert.AreEqual(jsonData.Data.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 13
0
 public void MiniEmeTest_BusiEMEGetSACCGetMyStudentsBookRecordsStatByDate()
 {
     MiniEmeClient emeClient = new MiniEmeClient(); // V3EME号:137799登录账号:reya_zy中文名:邹悦英文名:Reya
     var param = "{\"SaCcUserId\":\"656\",\"BeginTime\":\"2015-09-05\",\"EndTime\":\"2015-09-11 23:59:59\",\"BookedCourseNumFilter\":2}"; ;
     var result = emeClient.GetMyStudentsBookRecordsStatByDate(param);
     var jsonData = JsonHelper.FromJson<PageData<List<MyStudentCourseInfoModel>>>(result);
     Assert.AreEqual(jsonData.Data.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 14
0
 public void MiniEmeTest_BusiEMEGetSACCGetMyStudentCourseInfo()
 {
     MiniEmeClient emeClient = new MiniEmeClient(); // V3EME号:137799登录账号:reya_zy中文名:邹悦英文名:Reya
     var param = "{\"UserId\":\"137407\",\"BranchId\":\"198\",\"BeginTime\":\"2015-08-03\",\"EndTime\":\"2015-08-18 23:59:59\",\"PageSize\":\"20\",\"PageIndex\":\"1\"}"; ;
     var result = emeClient.GetMyStudentCourseInfo(param);
     var jsonData = JsonHelper.FromJson<PageData<List<MyStudentCourseInfoModel>>>(result);
     Assert.AreEqual(jsonData.Data.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 15
0
 public void MiniEmeTest_GetEmployeeInfoModelByUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var jsonText = "{\"userId\":\"28572\"}";
     var result = emeClient.GetEmployeeInfoByUserId(jsonText);
     var jsonData = JsonHelper.FromJson<object>(result);
     // var eq = Assert.Equals(jsonData.UserId, 136072);
     //Assert.AreEqual(jsonData.UserId, 135341);
     emeClient.Close();
 }
Ejemplo n.º 16
0
 public void MiniEmeTest_CreateCourseComment()
 {
     MiniEmeClient emeClient = new MiniEmeClient();//,{\"BookRecordId\":8247088,\"CheckinFlag\":true,\"TotalScore\":0,\"ItemsInfo\":\"4|0\",\"Comments\":\"test by api\"}
     var jsonParam = "[{\"BookRecordId\":8247207,\"TotalScore\":0,\"ItemsInfo\":\"4|0\",\"Comments\":\"\"}]";
     var result = emeClient.CreateCourseComment(jsonParam);
     var jsonData = JsonHelper.FromJson<Dictionary<string, string>>(result);
     Assert.AreEqual(jsonData["ResultCode"], "000000");
     emeClient.Close();
 }
Ejemplo n.º 17
0
 public void MiniEmeTest_GetStudentBookRecordList()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new StudentBookRecordParamModel() { UserId = 140925, PageIndex = 1, PageSize = 10, IsClassOver = true });
     var result = emeClient.GetStudentBookRecordList(param);
     var jsonData = JsonHelper.FromJson<PageData<List<StudentBookedRecordModel>>>(result);
     Assert.AreEqual(jsonData.Data.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 18
0
 public void MiniEmeTest_CreateCourseRateByStudentUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new CourseRateParamModel()
     {
         UserId = 135943,
         ArrangeCourseId = 1142353,
         Comments = "Test Create Student Rate Info!",
         ItemsInfo = "3|4,",
         TotalScore = 4
     });  //EmeId: 10152424 tel:13825221096   //高琪 Lily Arr:1131540
     var result = emeClient.CreateCourseRateByStudentUserId(param);
     var jsonData = JsonHelper.FromJson<Dictionary<string, string>>(result);
     Assert.AreEqual(jsonData["ResultCode"], "000000");
     emeClient.Close();
 }
Ejemplo n.º 19
0
 public void MiniEmeTest_GetUserInfoByMobile()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var jsonText = "{\"Mobile\":\"13701372330\",\"UserId\":\"103816\"}";
     var result = emeClient.GetUserInfoByMobile(jsonText);
     var jsonData = JsonHelper.FromJson<object>(result);
     // var eq = Assert.Equals(jsonData.UserId, 136072);
        // Assert.AreEqual(jsonData.UserId, 135341);
     emeClient.Close();
 }
Ejemplo n.º 20
0
        public void MiniEmeTest_CreateCourseRateByTeacherUserId()
        {
            MiniEmeClient emeClient = new MiniEmeClient();
            var jsonParam = JsonHelper.ToJson(new List<TeacherCourseRateParamModel>
            {
                new TeacherCourseRateParamModel(){
                BookRecordId = 7875313,
                CheckinFlag = false,
                TotalScore = 3,
                ItemsInfo = "4|3",
                Comments = "test by api",
                CreateBy = 133105
                },
                //new TeacherCourseRateParamModel(){
                //BookRecordId = 7123477,
                //IsNoShow = false,
                //TotalScore = 3,
                //ItemsInfo = "4|3",
                //Comments = "test by api",
                //CreateBy = 138513
                //}
            });

            var result = emeClient.CreateCourseRateByTeacherId(jsonParam);
            var jsonData = JsonHelper.FromJson<Dictionary<string, string>>(result);
            Assert.AreEqual(jsonData["ResultCode"], "000000");
            emeClient.Close();
        }
Ejemplo n.º 21
0
 public void MiniEmeTest_GetUserInfoModelUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var jsonText = "{\"UserId\":\"136072\"}";
     var result = emeClient.GetStudentInfoByUserId(jsonText);
     var jsonData = JsonHelper.FromJson<UserInfoModel>(result);
     // var eq = Assert.Equals(jsonData.UserId, 136072);
     Assert.AreEqual(jsonData.UserId, 136072);
     emeClient.Close();
 }
Ejemplo n.º 22
0
 public void MiniEmeTest_GetArrangeCourseListByUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new QueryArrangeCoursesParamModel()
     {
         UserId = 146840,
         PageIndex = 1,
         PageSize = 100,
         // IsBookQueue = false,
         QueryParamModel = new List<ArrangeCourseParamModel>() { new ArrangeCourseParamModel()
         {  BranchId = 42,
             ContractLevelId = 497458,
             ProductLevelId = 2},new ArrangeCourseParamModel()
         {  BranchId = 42,
             ContractLevelId = 497460,
             ProductLevelId = 14} }
     });
     var result = emeClient.GetArrangeCourseListByUserId(param);
     var dics = JsonHelper.FromJson<PageData<List<ArrangeCourseModel>>>(result);
     Assert.AreEqual(dics.Data.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 23
0
 public void MiniEmeTest_IsExistedCourseRateByStudentUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new IsExistCourseRateParamModel() { UserId = 135943, ArrangeCourseId = 1142353 });  //EmeId: 10152424 tel:13825221096   //高琪 Lily Arr:1131540
     var result = emeClient.IsExistCourseRateByStudentUserId(param);
     var jsonData = JsonHelper.FromJson<Dictionary<string, string>>(result);
     Assert.AreEqual(jsonData["ResultCode"], "000000");
     emeClient.Close();
 }
Ejemplo n.º 24
0
 public void MiniEmeTest_GetBookRecordForPushWebChatMsgList()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new BookRecordForPushWebChatMsgModel() { ShowNow = 50, SynDate = DateTime.Parse("2015-08-14 21:30:03.907"), FailedId = "" });
     var result = emeClient.GetBookRecordForPushWebChatMsgList(param);
     var jsonData = JsonHelper.FromJson<List<object>>(result);
     Assert.AreEqual(jsonData.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 25
0
 public void MiniEmeTest_NewCreateBookCourseByStudentId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new BookCourseParamModel()
     {
         //UserId = 115723,
         StudentId = 97196,
         ArrangeCourseId = 1400891,
         IsForce = false,
         BookUserId = 115723,
         ProductLevelId = 2,
         ContractLevelId = 406696,
         BookSource = 101
     });
     var result = emeClient.CreateBookCourseByUserId(param);
     Assert.AreEqual(result, 100);
     emeClient.Close();
 }
Ejemplo n.º 26
0
 public void MiniEmeTest_GetContractInfoByUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var jsonText = "{\"UserId\":\"136367\"}";        //136072
     var result = emeClient.GetContractInfoByUserId(jsonText);
     var jsonData = JsonHelper.FromJson<List<ContractModel>>(result);
     Assert.AreEqual(jsonData.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 27
0
 public void MiniEmeTest_ResetBookRecordForPushingWebChatMsgList()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new ResetBookRecordForPushingWebChatMsgModel() { SynDate = DateTime.Now, BookrecordIds = "8246097,8246081", FailedBookrecordIds = "" });
     var result = emeClient.ResetBookRecordForPushingWebChatMsgList(param);
     var jsonData = JsonHelper.FromJson<Dictionary<string, string>>(result);
     Assert.AreEqual(jsonData["ResultCode"], "000000");
     emeClient.Close();
 }
Ejemplo n.º 28
0
 public void MiniEmeTest_GetCurrentProductLevelByUserId()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = "{\"UserId\":\"136072\"}";
     var result = emeClient.GetCurrentProductLevelByUserId(param);
     var jsonData = JsonHelper.FromJson<List<object>>(result);
     Assert.AreEqual(jsonData.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 29
0
 public void MiniEmeTest_BusiEMEGetCourseRateDetailByBatchNo()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = "{\"BatchNo\":\"E2E7A7C5-3109-4780-A80E-0BC99420F09F\"}";
     var result = emeClient.GetCourseRateDetailByBatchNo(param);
     var jsonData = JsonHelper.FromJson<List<object>>(result);
     Assert.AreEqual(jsonData.Count > 0, true);
     emeClient.Close();
 }
Ejemplo n.º 30
0
 public void MiniEmeTest_BusiEMEGetCourseStudentList()
 {
     MiniEmeClient emeClient = new MiniEmeClient();
     var param = JsonHelper.ToJson(new { arrangeCourseId = 1335519 });
     var result = emeClient.GetCourseStudentList(param);
     var jsonData = JsonHelper.FromJson<List<object>>(result);
     Assert.AreEqual(jsonData.Count > 0, true);
     emeClient.Close();
 }