public void MethodShouldBeNamedAccordingToSynchronicity_MVC_Core(string aspNetCoreMvcVersion, string aspNetCoreRoutingVersion) => Verifier.VerifyAnalyzer(@"TestCases\MethodShouldBeNamedAccordingToSynchronicity.MVC.Core.cs", new MethodShouldBeNamedAccordingToSynchronicity(), additionalReferences: NetStandardMetadataReference.Netstandard .Concat(NuGetMetadataReference.MicrosoftAspNetCoreMvcCore(aspNetCoreMvcVersion)) .Concat(NuGetMetadataReference.MicrosoftAspNetCoreMvcViewFeatures(aspNetCoreMvcVersion)) .Concat(NuGetMetadataReference.MicrosoftAspNetCoreRoutingAbstractions(aspNetCoreRoutingVersion)));
public void MemberShouldBeStatic(string aspnetCoreVersion, string aspnetVersion) => Verifier.VerifyAnalyzer(@"TestCases\MemberShouldBeStatic.cs", new MemberShouldBeStatic(), additionalReferences: NuGetMetadataReference.MicrosoftAspNetCoreMvcWebApiCompatShim(aspnetCoreVersion) .Concat(NuGetMetadataReference.MicrosoftAspNetMvc(aspnetVersion)) .Concat(NuGetMetadataReference.MicrosoftAspNetCoreMvcCore(aspnetCoreVersion)) .Concat(NuGetMetadataReference.MicrosoftAspNetCoreMvcViewFeatures(aspnetCoreVersion)) .Concat(NuGetMetadataReference.MicrosoftAspNetCoreRoutingAbstractions(aspnetCoreVersion)) .ToImmutableArray());
public void UriShouldNotBeHardcoded_CSharp_VirtualPath_AspNetCore(string aspNetCoreMvcVersion, string aspNetCoreRoutingVersion) { Verifier.VerifyAnalyzer(@"TestCases\UriShouldNotBeHardcoded.AspNetCore.cs", new UriShouldNotBeHardcoded(), additionalReferences: // for VirtualFileResult NuGetMetadataReference.MicrosoftAspNetCoreMvcCore(aspNetCoreMvcVersion) // for Controller .Concat(NuGetMetadataReference.MicrosoftAspNetCoreMvcViewFeatures(aspNetCoreMvcVersion)) // for IRouter and VirtualPathData .Concat(NuGetMetadataReference.MicrosoftAspNetCoreRoutingAbstractions(aspNetCoreRoutingVersion)) .ToArray()); }
public void UriShouldNotBeHardcoded_CSharp_VirtualPath_AspNetCore(string aspNetCoreMvcVersion, string aspNetCoreRoutingVersion, string netHttpHeadersVersion) => Verifier.VerifyAnalyzer(@"TestCases\UriShouldNotBeHardcoded.AspNetCore.cs", new CS.UriShouldNotBeHardcoded(), // for VirtualFileResult NuGetMetadataReference.MicrosoftAspNetCoreMvcCore(aspNetCoreMvcVersion) // for Controller .Concat(NuGetMetadataReference.MicrosoftAspNetCoreMvcViewFeatures(aspNetCoreMvcVersion)) // for IRouter and VirtualPathData .Concat(NuGetMetadataReference.MicrosoftAspNetCoreRoutingAbstractions(aspNetCoreRoutingVersion)) // for IRouteBuilder .Concat(NuGetMetadataReference.MicrosoftAspNetCoreRouting(aspNetCoreRoutingVersion)) // for IActionResult .Concat(NuGetMetadataReference.MicrosoftAspNetCoreMvcAbstractions(aspNetCoreMvcVersion)) .Concat(NuGetMetadataReference.MicrosoftNetHttpHeaders(netHttpHeadersVersion)) .ToImmutableArray());
internal static IEnumerable <MetadataReference> GetAdditionalReferences() => NetStandardMetadataReference.Netstandard .Concat(NuGetMetadataReference.MicrosoftAspNetCoreMvcCore(Constants.NuGetLatestVersion)) .Concat(NuGetMetadataReference.MicrosoftAspNetCoreMvcViewFeatures(Constants.NuGetLatestVersion));