diff options
Diffstat (limited to 'spec/fixtures/dotnet/nuget-sln/src')
9 files changed, 131 insertions, 0 deletions
diff --git a/spec/fixtures/dotnet/nuget-sln/src/domain/Library.fs b/spec/fixtures/dotnet/nuget-sln/src/domain/Library.fs new file mode 100644 index 0000000..decb580 --- /dev/null +++ b/spec/fixtures/dotnet/nuget-sln/src/domain/Library.fs @@ -0,0 +1,5 @@ +namespace domain + +module Say = + let hello name = + printfn "Hello %s" name diff --git a/spec/fixtures/dotnet/nuget-sln/src/domain/domain.fsproj b/spec/fixtures/dotnet/nuget-sln/src/domain/domain.fsproj new file mode 100644 index 0000000..951dc19 --- /dev/null +++ b/spec/fixtures/dotnet/nuget-sln/src/domain/domain.fsproj @@ -0,0 +1,8 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <TargetFramework>netstandard2.0</TargetFramework> + </PropertyGroup> + <ItemGroup> + <Compile Include="Library.fs" /> + </ItemGroup> +</Project> diff --git a/spec/fixtures/dotnet/nuget-sln/src/service/Class1.cs b/spec/fixtures/dotnet/nuget-sln/src/service/Class1.cs new file mode 100644 index 0000000..79cc794 --- /dev/null +++ b/spec/fixtures/dotnet/nuget-sln/src/service/Class1.cs @@ -0,0 +1,8 @@ +using System; + +namespace service +{ + public class Class1 + { + } +} diff --git a/spec/fixtures/dotnet/nuget-sln/src/service/service.csproj b/spec/fixtures/dotnet/nuget-sln/src/service/service.csproj new file mode 100644 index 0000000..4641dbd --- /dev/null +++ b/spec/fixtures/dotnet/nuget-sln/src/service/service.csproj @@ -0,0 +1,5 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <TargetFramework>netstandard2.0</TargetFramework> + </PropertyGroup> +</Project> diff --git a/spec/fixtures/dotnet/nuget-sln/src/test/UnitTest1.cs b/spec/fixtures/dotnet/nuget-sln/src/test/UnitTest1.cs new file mode 100644 index 0000000..57a51a3 --- /dev/null +++ b/spec/fixtures/dotnet/nuget-sln/src/test/UnitTest1.cs @@ -0,0 +1,14 @@ +using System; +using Xunit; + +namespace test +{ + public class UnitTest1 + { + [Fact] + public void Test1() + { + + } + } +} diff --git a/spec/fixtures/dotnet/nuget-sln/src/test/test.csproj b/spec/fixtures/dotnet/nuget-sln/src/test/test.csproj new file mode 100644 index 0000000..b8a2cbb --- /dev/null +++ b/spec/fixtures/dotnet/nuget-sln/src/test/test.csproj @@ -0,0 +1,12 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <TargetFramework>netcoreapp3.1</TargetFramework> + <IsPackable>false</IsPackable> + </PropertyGroup> + <ItemGroup> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" /> + <PackageReference Include="xunit" Version="2.4.0" /> + <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" /> + <PackageReference Include="coverlet.collector" Version="1.2.0" /> + </ItemGroup> +</Project> diff --git a/spec/fixtures/dotnet/nuget-sln/src/web/Program.cs b/spec/fixtures/dotnet/nuget-sln/src/web/Program.cs new file mode 100644 index 0000000..b59641b --- /dev/null +++ b/spec/fixtures/dotnet/nuget-sln/src/web/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace web +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host + .CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => { + webBuilder.UseStartup<Startup>(); + }); + } +} diff --git a/spec/fixtures/dotnet/nuget-sln/src/web/Startup.cs b/spec/fixtures/dotnet/nuget-sln/src/web/Startup.cs new file mode 100644 index 0000000..26facf4 --- /dev/null +++ b/spec/fixtures/dotnet/nuget-sln/src/web/Startup.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace web +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + public void ConfigureServices(IServiceCollection services) + { + services.AddControllersWithViews(); + } + + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseExceptionHandler("/Home/Error"); + app.UseHsts(); + } + app.UseHttpsRedirection(); + app.UseStaticFiles(); + app.UseRouting(); + app.UseAuthorization(); + app.UseEndpoints(endpoints => { + endpoints.MapControllerRoute(name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); + }); + } + } +} diff --git a/spec/fixtures/dotnet/nuget-sln/src/web/web.csproj b/spec/fixtures/dotnet/nuget-sln/src/web/web.csproj new file mode 100644 index 0000000..a5af522 --- /dev/null +++ b/spec/fixtures/dotnet/nuget-sln/src/web/web.csproj @@ -0,0 +1,5 @@ +<Project Sdk="Microsoft.NET.Sdk.Web"> + <PropertyGroup> + <TargetFramework>netcoreapp3.1</TargetFramework> + </PropertyGroup> +</Project> |
