public void it_returns_project_details_when_passing_projectInfo()
        {
            var project = new ProjectRef { Id = "project137" };
            Project projectDetails = _client.ProjectDetails(project);

            Assert.That(!string.IsNullOrWhiteSpace(projectDetails.Id));
        }
Exemple #2
0
        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
        {
            ProjectRef pRef = value as ProjectRef;
            string     projectReferenceValue = value as string;

            if (destType == typeof(string))
            {
                if (pRef != null)
                {
                    return(pRef.Name);
                }

                if (projectReferenceValue != null)
                {
                    return(value);
                }
            }

            return(base.ConvertTo(context, culture, value, destType));
        }