示例#1
0
        public void TesGetUserId()
        {
            IChatterService service = new ChatterService.ChatterService(_url);
            service.Login(_username, _password, _token);

            string id = service.GetUserId(_employeeId);
            Assert.AreEqual(_userId, id);
        }
示例#2
0
 public void TesGetUserIdByEmptyEmployeeId()
 {
     IChatterService service = new ChatterService.ChatterService(_url);
     try {
         string id = service.GetUserId("");
         Assert.Fail("GetUserId method should throw and exception Employee ID is empty string");
     }
     catch (Exception ex)
     {
         Assert.AreEqual("Employee Id is required", ex.Message);
     }
 }
示例#3
0
        public void TestUsersToGroup()
        {
            IChatterService service = new ChatterService.ChatterService(_url);
            service.Login(_username, _password, _token);
            string id = service.CreateGroup("Test API Group", "This group was created by unit test", _employeeId);

            service.AddUsersToGroup(id, new string[]{"020524930", "025693078"});
        }
示例#4
0
 public void TestGetActivitiesByUser()
 {
     IChatterService service = new ChatterService.ChatterService(_url);
     service.Login(_username, _password, _token);
     List<Activity> list = service.GetUserActivities(_userId, 123, 10);
     Assert.AreEqual(10, list.Count);
 }
示例#5
0
 public void TestLogin()
 {
     IChatterService service = new ChatterService.ChatterService(_url);
     service.Login(_username, _password, _token);
 }
示例#6
0
 public void TestCreateReseachProfile()
 {
     IChatterService service = new ChatterService.ChatterService(_url);
     service.Login(_username, _password, _token);
     service.CreateResearchProfile(_employeeId);
 }
示例#7
0
        public void TestCreateProfileActivity()
        {
            //IChatterService service = new ChatterService.ChatterService(_url);
            //service.Login(_username, _password, _token);
            IChatterService service = new ChatterService.ChatterService("https://test.salesforce.com/services/Soap/c/22.0");
            service.Login("*****@*****.**", "CTProf123", "ao56v6ERhH0XD1U4aan0QTST");

            DateTime dt = new DateTime(2011, 7, 29, 14, 11, 12);
            service.CreateProfileActivity("021125612", "Edited their narrative", "Test Activity from 'TestCreateReseachProfile':" + dt, dt);
            //service.CreateProfileActivity(_employeeId, "Edited their narrative", "Test Activity from 'TestCreateReseachProfile':" + dt, dt);
        }
示例#8
0
 public void TestCreateGroup()
 {
     IChatterService service = new ChatterService.ChatterService(_url);
     service.Login(_username, _password, _token);
     service.CreateGroup("Test API Group", "This group was created by unit test", _employeeId);
 }
示例#9
0
        public void TestCreateActivityUsingApex()
        {
            IChatterService service = new ChatterService.ChatterService(_url);
            service.Login(_username, _password, _token);

            DateTime dt = DateTime.Now;
            service.CreateActivityUsingApex(_userId, "Edited their narrative", "Test Activity from 'ChatterServiceTest.TestCreateActivityUsingApex':" + dt, dt);
        }
示例#10
0
        public void TestCreateActivity()
        {
            IChatterService service = new ChatterService.ChatterService(_url);
            service.Login(_username, _password, _token);

            DateTime dt = new DateTime(2011, 7, 6, 10, 11, 12);
            service.CreateActivity(_userId, "Edited their narrative", "Test Activity from ChatterServiceTest.TestCreateActivity:" + dt, dt);
        }