コード例 #1
0
        public void DeserializeTest()
        {
            Position position = new Position
              {
            Title = Constants.Position_Title
              };

              Company company = new Company
              {
            Name = Constants.Company_Name
              };

              Job expected = new Job
              {
            Id = Constants.Job_Id,
            Position = position,
            Company = company
              };

              Job actual = LinkedIn.Utility.Utilities.DeserializeXml<Job>(this.jobRequest);

              Assert.AreEqual(expected.Id, actual.Id);
              Assert.AreEqual(expected.Position.Title, actual.Position.Title);
              Assert.AreEqual(expected.Company.Name, actual.Company.Name);
        }
コード例 #2
0
        public void DeserializeTest()
        {
            CompanyType companyType = new CompanyType
              {
            Code = Constants.CompanyType_Code,
            Name = Constants.CompanyType_Name
              };

              Company expected = new Company
              {
            Id = Constants.Company_Id,
            Name = Constants.Company_Name,
            Type = companyType
              };

              Company actual = LinkedIn.Utility.Utilities.DeserializeXml<Company>(this.companyRequest);

              Assert.AreEqual(expected.Id, actual.Id);
              Assert.AreEqual(expected.Name, actual.Name);
              Assert.AreEqual(expected.Type.Code, actual.Type.Code);
        }