public void IsWebClassLibrary_Returns_True_If_WebClassFeature_Is_Present()
        {
            var mockResult = new FeatureDetectionResult
            {
                FeatureStatus = { { Constants.WebClassLibraryFeatureName, true } }
            };

            Assert.True(mockResult.IsWebClassLibrary());
        }
Example #2
0
 private ProjectType GetProjectType(FeatureDetectionResult projectTypeFeatureResult)
 {
     if (projectTypeFeatureResult.IsMvcProject())
     {
         return ProjectType.Mvc;
     }
     else if (projectTypeFeatureResult.IsWebApiProject())
     {
         return ProjectType.WebApi;
     }
     else if (projectTypeFeatureResult.IsWebClassLibrary())
     {
         return ProjectType.WebClassLibrary;
     }
     return ProjectType.ClassLibrary;
 }
Example #3
0
 internal ProjectType GetProjectType(FeatureDetectionResult projectTypeFeatureResult)
 {
     if (projectTypeFeatureResult.IsMvcProject())
     {
         return(ProjectType.Mvc);
     }
     else if (projectTypeFeatureResult.IsWebApiProject())
     {
         return(ProjectType.WebApi);
     }
     else if (projectTypeFeatureResult.IsWebClassLibrary())
     {
         return(ProjectType.WebClassLibrary);
     }
     return(ProjectType.ClassLibrary);
 }
Example #4
0
 internal ProjectType GetProjectType(FeatureDetectionResult projectTypeFeatureResult)
 {
     if (projectTypeFeatureResult.IsMvcProject())
     {
         return(ProjectType.Mvc);
     }
     else if (projectTypeFeatureResult.IsWebApiProject())
     {
         return(ProjectType.WebApi);
     }
     else if (projectTypeFeatureResult.IsAspNetWebFormsProject())
     {
         return(ProjectType.WebForms);
     }
     else if (projectTypeFeatureResult.IsWebClassLibrary())
     {
         return(ProjectType.WebClassLibrary);
     }
     else if (projectTypeFeatureResult.IsWCFServiceConfigBasedProject())
     {
         if (projectTypeFeatureResult.HasServiceHostReference())
         {
             return(ProjectType.WCFConfigBasedService);
         }
         else
         {
             return(ProjectType.WCFServiceLibrary);
         }
     }
     else if (projectTypeFeatureResult.IsWCFServiceCodeBasedProject())
     {
         return(ProjectType.WCFCodeBasedService);
     }
     else if (projectTypeFeatureResult.IsWCFClientProject())
     {
         return(ProjectType.WCFClient);
     }
     return(ProjectType.ClassLibrary);
 }