Skip to content

Commit efd33fd

Browse files
committed
Revert "Whoops"
This reverts commit 9c4d92a. Revert "DbUp" This reverts commit 61af1be.
1 parent 9c4d92a commit efd33fd

File tree

8 files changed

+23
-104
lines changed

8 files changed

+23
-104
lines changed

Build.ps1

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ function Exec
2323
}
2424

2525
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }
26-
if(Test-Path .\publish) { Remove-Item .\publish -Force -Recurse }
2726

2827

2928
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
@@ -32,30 +31,39 @@ $suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch
3231
$commitHash = $(git rev-parse --short HEAD)
3332
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]
3433

34+
exec { & .\tools\rh.exe /d=ContosoUniversity /f=ContosoUniversity\App_Data /s="(LocalDb)\mssqllocaldb" /silent }
35+
exec { & .\tools\rh.exe /d=ContosoUniversity-Test /f=ContosoUniversity\App_Data /s="(LocalDb)\mssqllocaldb" /silent /drop }
36+
exec { & .\tools\rh.exe /d=ContosoUniversity-Test /f=ContosoUniversity\App_Data /s="(LocalDb)\mssqllocaldb" /silent /simple }
37+
38+
3539
exec { & dotnet restore }
3640

3741
exec { & dotnet build -c Release --version-suffix=$buildSuffix }
3842

3943
Push-Location -Path .\ContosoUniversity.IntegrationTests
4044

4145
try {
42-
exec { & dotnet xunit -configuration Release -nobuild }
46+
exec { & dotnet test -c Release --no-build }
4347
}
4448
finally {
4549
Pop-Location
4650
}
4751

48-
exec { & dotnet publish ContosoUniversity.Database --output .\..\publish\ContosoUniversity.Database --configuration Release }
52+
#Push-Location -Path .\test\ContosoUniversity.UnitTests
4953

50-
exec { & dotnet .\publish\ContosoUniversity.Database\ContosoUniversity.Database.dll }
54+
#try {
55+
# exec { & dotnet test -c Release --no-build }
56+
#}
57+
#finally {
58+
# Pop-Location
59+
#}
5160

52-
exec { & dotnet publish ContosoUniversity --output .\..\publish\ContosoUniversity --configuration Release }
61+
exec { & dotnet publish ContosoUniversity --output .\..\publish --configuration Release }
5362

5463
$octo_revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = "0" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
5564
$octo_version = "1.0.$octo_revision"
5665

57-
exec { & .\tools\Octo.exe pack --id ContosoUniversity --version $octo_version --basePath publish\ContosoUniversity --outFolder artifacts }
58-
exec { & .\tools\Octo.exe pack --id ContosoUniversity.Database --version $octo_version --basePath publish\ContosoUniversity.Database --outFolder artifacts }
66+
exec { & .\tools\Octo.exe pack --id ContosoUniversity --version $octo_version --basePath publish --outFolder artifacts }
5967

6068

6169

ContosoUniversity.Database/ContosoUniversity.Database.csproj

Lines changed: 0 additions & 21 deletions
This file was deleted.

ContosoUniversity.Database/Program.cs

Lines changed: 0 additions & 43 deletions
This file was deleted.

ContosoUniversity.IntegrationTests/ContosoUniversity.IntegrationTests.csproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,18 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0-preview-20170923-02" />
15-
<PackageReference Include="xunit" Version="2.3.0-rc2-build3812" />
16-
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-rc2-build3812" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0-preview-20170810-02" />
15+
<PackageReference Include="xunit" Version="2.3.0-beta4-build3742" />
16+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-beta1-build3642" />
1717
<PackageReference Include="Shouldly" Version="3.0.0-beta0003" />
18-
<PackageReference Include="Respawn" Version="1.0.1" />
18+
<PackageReference Include="Respawn" Version="0.3.0" />
1919
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
2020
<PackageReference Include="FakeItEasy" Version="4.0.0" />
2121
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.0.0" />
22-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-rc2-build3812" />
23-
<PackageReference Include="dbup-sqlserver" Version="4.0.0-beta0002" />
22+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta4-build3742" />
2423
</ItemGroup>
2524

2625
<ItemGroup>
27-
<ProjectReference Include="..\ContosoUniversity.Database\ContosoUniversity.Database.csproj" />
2826
<ProjectReference Include="..\ContosoUniversity\ContosoUniversity.csproj" />
2927
</ItemGroup>
3028

ContosoUniversity.IntegrationTests/SliceFixture.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Threading.Tasks;
44
using ContosoUniversity.Data;
55
using ContosoUniversity.Models;
6-
using DbUp;
76
using FakeItEasy;
87
using MediatR;
98
using Microsoft.AspNetCore.Hosting;
@@ -39,22 +38,6 @@ static SliceFixture()
3938
var provider = services.BuildServiceProvider();
4039
_scopeFactory = provider.GetService<IServiceScopeFactory>();
4140
_checkpoint = new Checkpoint();
42-
43-
var connectionString = _configuration.GetConnectionString("DefaultConnection");
44-
45-
var upgrader =
46-
DeployChanges.To
47-
.SqlDatabase(connectionString)
48-
.WithScriptsEmbeddedInAssembly(typeof(ContosoUniversity.Database.Program).Assembly, s => s.EndsWith(".sql"))
49-
.LogToConsole()
50-
.Build();
51-
52-
EnsureDatabase.For.SqlDatabase(connectionString);
53-
54-
var result = upgrader.PerformUpgrade();
55-
56-
if (!result.Successful)
57-
throw result.Error;
5841
}
5942

6043
public static Task ResetCheckpoint() => _checkpoint.Reset(_configuration.GetConnectionString("DefaultConnection"));

ContosoUniversity.sln

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26730.10
4+
VisualStudioVersion = 15.0.26730.8
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ContosoUniversity", "ContosoUniversity\ContosoUniversity.csproj", "{DDBC05AD-34FD-43B7-B0D1-45819DEC4AA1}"
77
EndProject
8-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ContosoUniversity.IntegrationTests", "ContosoUniversity.IntegrationTests\ContosoUniversity.IntegrationTests.csproj", "{70FF0FF8-4876-4A7A-AE4A-53C92A2C1531}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContosoUniversity.IntegrationTests", "ContosoUniversity.IntegrationTests\ContosoUniversity.IntegrationTests.csproj", "{70FF0FF8-4876-4A7A-AE4A-53C92A2C1531}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{13186C93-7307-4FEA-A17C-4556F54FF5F1}"
1111
ProjectSection(SolutionItems) = preProject
@@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1515
README.md = README.md
1616
EndProjectSection
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContosoUniversity.Database", "ContosoUniversity.Database\ContosoUniversity.Database.csproj", "{FA552E39-B5B0-46E3-822D-AD0976D938BA}"
19-
EndProject
2018
Global
2119
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2220
Debug|Any CPU = Debug|Any CPU
@@ -31,10 +29,6 @@ Global
3129
{70FF0FF8-4876-4A7A-AE4A-53C92A2C1531}.Debug|Any CPU.Build.0 = Debug|Any CPU
3230
{70FF0FF8-4876-4A7A-AE4A-53C92A2C1531}.Release|Any CPU.ActiveCfg = Release|Any CPU
3331
{70FF0FF8-4876-4A7A-AE4A-53C92A2C1531}.Release|Any CPU.Build.0 = Release|Any CPU
34-
{FA552E39-B5B0-46E3-822D-AD0976D938BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35-
{FA552E39-B5B0-46E3-822D-AD0976D938BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
36-
{FA552E39-B5B0-46E3-822D-AD0976D938BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
37-
{FA552E39-B5B0-46E3-822D-AD0976D938BA}.Release|Any CPU.Build.0 = Release|Any CPU
3832
EndGlobalSection
3933
GlobalSection(SolutionProperties) = preSolution
4034
HideSolutionNode = FALSE

ContosoUniversity/ContosoUniversity.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ItemGroup>
1515
<PackageReference Include="AutoMapper" Version="6.1.1" />
1616
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="3.0.1" />
17-
<PackageReference Include="FluentValidation.AspNetCore" Version="7.2.0-beta3" />
17+
<PackageReference Include="FluentValidation.AspNetCore" Version="7.2.0-beta2" />
1818
<PackageReference Include="HtmlTags.AspNetCore" Version="5.0.2" />
1919
<!--<PackageReference Include="HtmlTags.AspNetCore" Version="5.0.0" />-->
2020
<PackageReference Include="MediatR" Version="3.0.1" />

0 commit comments

Comments
 (0)