public void TesGetUserId() { IChatterService service = new ChatterService.ChatterService(_url); service.Login(_username, _password, _token); string id = service.GetUserId(_employeeId); Assert.AreEqual(_userId, id); }
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); } }
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"}); }
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); }
public void TestLogin() { IChatterService service = new ChatterService.ChatterService(_url); service.Login(_username, _password, _token); }
public void TestCreateReseachProfile() { IChatterService service = new ChatterService.ChatterService(_url); service.Login(_username, _password, _token); service.CreateResearchProfile(_employeeId); }
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); }
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); }
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); }
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); }