示例#1
0
        /// <summary>
        /// Gets the build.
        /// </summary>
        /// <param name="buildDescriptor">The build descriptor.</param>
        /// <returns></returns>
        public Build GetBuild(BuildDescriptor buildDescriptor)
        {
            Build build = new NullBuild(buildDescriptor);

            var url = new XmlApiPrepender().Prepend(build.Url);

            if (buildDescriptor != null)
            {
                var xml = XmlService.GetPage(url);

                if (xml.IsValid)
                {
                    build = new BuildMapper().Map(xml.Contents);
                }
            }

            return build;
        }
 public void SetUp()
 {
     mapper = new BuildMapper();
 }