示例#1
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetPPSDepartmentByOrgOId()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.PpsDepartment.Search(PPSDepartmentSearchField.orgOId, "F80B657CA26C23A0E0340003BA8A560D");

            Assert.AreEqual(result.ResponseStatus, 0);
            Assert.AreEqual(result.ResponseData.Results[0].deptDisplayName, "AGR & ENV SCI DEANS OFFICE");
            Assert.IsNotNull(client);
        }
示例#2
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetPPSDepartmentWhenNotFound()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.PpsDepartment.Search(PPSDepartmentSearchField.deptCode, "099000");

            Assert.AreEqual(result.ResponseStatus, 0);
            Assert.AreEqual(result.ResponseData.Results.Length, 0);
            Assert.IsNotNull(client);
        }
示例#3
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetPPSDepartmentByDeptCode()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.PpsDepartment.Search(PPSDepartmentSearchField.deptCode, "030000");

            Assert.AreEqual(result.ResponseStatus, 0);
            Assert.AreEqual(result.ResponseData.Results[0].deptDisplayName, "AGR & ENV SCI DEANS OFFICE");
            Assert.IsNotNull(client);
        }
示例#4
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetPersonInfo()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.People.Get("1000029584");

            // 0 is success
            Assert.AreEqual(result.ResponseStatus, 0);

            Assert.AreEqual(result.ResponseData.Results[0].IamId, "1000029584");

            Assert.IsNotNull(client);
        }
示例#5
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetPPSAssociationsWithPeopleReturnType()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.PPSAssociations.Search <PeopleResults>(PPSAssociationsSearchField.iamId, "1000029584", "people");

            // 0 is success
            Assert.AreEqual(result.ResponseStatus, 0);

            Assert.AreEqual(result.ResponseData.Results[0].IamId, "1000029584");

            Assert.IsNotNull(client);
        }
示例#6
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetPPSIamIds()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.PPSAssociations.GetIamIds(PPSAssociationsSearchField.deptCode, "030003");

            // 0 is success
            Assert.AreEqual(result.ResponseStatus, 0);

            Assert.IsTrue(result.ResponseData.Results.Length > 500);

            Assert.IsNotNull(client);
        }
示例#7
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanSearchContactEmail()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.Contacts.Search(ContactSearchField.email, "*****@*****.**");

            // 0 is success
            Assert.AreEqual(result.ResponseStatus, 0);

            Assert.AreEqual(result.ResponseData.Results[0].IamId, "1000029584");

            Assert.IsNotNull(client);
        }
示例#8
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetKerberos()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.Kerberos.Search(KerberosSearchField.iamId, "1000029584");

            // 0 is success
            Assert.AreEqual(result.ResponseStatus, 0);

            Assert.AreEqual(result.ResponseData.Results[0].IamId, "1000029584");

            Assert.IsNotNull(client);
        }
示例#9
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetPersonInfo3()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.People.Search(PeopleSearchField.employeeId, "10220155");

            // 0 is success
            Assert.AreEqual(result.ResponseStatus, 0);

            Assert.AreEqual(result.ResponseData.Results[0].IamId, "1000009309");
            Assert.AreEqual(result.ResponseData.Results[0].EmployeeId, "10220155");

            Assert.IsNotNull(client);
        }
示例#10
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetPPSAssociationsSupervisorIamId()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.PPSAssociations.Search(PPSAssociationsSearchField.iamId, "1000009309");

            // 0 is success
            Assert.AreEqual(result.ResponseStatus, 0);

            Assert.AreEqual(result.ResponseData.Results[0].IamId, "1000009309");
            Assert.AreEqual(result.ResponseData.Results[0].reportsToIAMID, "1000029584");

            Assert.IsNotNull(client);
        }
示例#11
0
文件: ApiTests.cs 项目: ucdavis/ietws
        public async Task CanGetPronounInfo3()
        {
            var client = new Ietws.IetClient(key);
            var result = await client.People.Get("1000219473");

            // 0 is success
            Assert.AreEqual(result.ResponseStatus, 0);

            Assert.AreEqual(result.ResponseData.Results[0].IamId, "1000219473");
            Assert.AreEqual(result.ResponseData.Results[0].DPronouns, "He, Him");

            Assert.IsNotNull(client);
        }
示例#12
0
 public PeopleRequests(IetClient client) : base(client)
 {
 }
示例#13
0
 public ContactRequests(IetClient client) : base(client)
 {
 }
示例#14
0
 public KerberosRequests(IetClient client) : base(client)
 {
 }
示例#15
0
 public PPSAssociationsRequests(IetClient client) : base(client)
 {
 }
示例#16
0
 public RequestBase(IetClient client)
 {
     this.client     = client;
     this.QueryItems = new Dictionary <string, string>();
 }