Skip to content

Commit 24c5b75

Browse files
Separate CMS 13 data stores from legacy CMS 12 data stores to avoid conflicts.
1 parent adde320 commit 24c5b75

66 files changed

Lines changed: 439 additions & 4901 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net10.0</TargetFramework>
5-
</PropertyGroup>
6-
<ItemGroup>
7-
<PackageReference Include="EPiServer.CMS" Version="13.0.0-preview4" />
8-
<PackageReference Include="EPiServer.Cms.UI.AspNetIdentity" Version="13.0.0-preview4" />
9-
<PackageReference Include="EPiServer.Cms.UI.ContentManager" Version="13.0.0-preview4" />
10-
<PackageReference Include="EPiServer.Cms.UI.VisitorGroups" Version="13.0.0-preview4" />
11-
<PackageReference Include="HtmlAgilityPack" Version="1.12.4" />
12-
<PackageReference Include="MediatR" Version="14.1.0" />
13-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.2" />
14-
<PackageReference Include="Optimizely.Graph.Cms" Version="13.0.0-preview4" />
15-
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
16-
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.7" />
17-
</ItemGroup>
18-
<ItemGroup>
19-
<ProjectReference Include="..\..\src\Stott.Security.Optimizely\Stott.Security.Optimizely.csproj" />
20-
</ItemGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<PackageReference Include="EPiServer.CMS" Version="13.0.0-preview4" />
8+
<PackageReference Include="EPiServer.Cms.UI.AspNetIdentity" Version="13.0.0-preview4" />
9+
<PackageReference Include="EPiServer.Cms.UI.ContentManager" Version="13.0.0-preview4" />
10+
<PackageReference Include="EPiServer.Cms.UI.VisitorGroups" Version="13.0.0-preview4" />
11+
<PackageReference Include="HtmlAgilityPack" Version="1.12.4" />
12+
<PackageReference Include="MediatR" Version="14.1.0" />
13+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.2" />
14+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.2" />
15+
<PackageReference Include="Optimizely.Graph.Cms" Version="13.0.0-preview4" />
16+
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
17+
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.7" />
18+
</ItemGroup>
19+
<ItemGroup>
20+
<ProjectReference Include="..\..\src\Stott.Security.Optimizely\Stott.Security.Optimizely.csproj" />
21+
</ItemGroup>
2122
</Project>

src/Stott.Security.Optimizely.Test/Features/Audit/AuditRepositoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class AuditRepositoryTests
1717
{
1818
private TestDataContext _inMemoryDatabase;
1919

20-
private Lazy<ICspDataContext> _lazyInMemoryDatabase;
20+
private Lazy<IStottSecurityDataContext> _lazyInMemoryDatabase;
2121

2222
private AuditRepository _repository;
2323

@@ -26,7 +26,7 @@ public void SetUp()
2626
{
2727
_inMemoryDatabase = TestDataContextFactory.Create();
2828

29-
_lazyInMemoryDatabase = new Lazy<ICspDataContext>(() => _inMemoryDatabase);
29+
_lazyInMemoryDatabase = new Lazy<IStottSecurityDataContext>(() => _inMemoryDatabase);
3030

3131
_repository = new AuditRepository(_lazyInMemoryDatabase);
3232
}

src/Stott.Security.Optimizely.Test/Features/Cors/Repository/CorsSettingsRepositoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public sealed class CorsSettingsRepositoryTests
1818
{
1919
private TestDataContext _inMemoryDatabase;
2020

21-
private Lazy<ICspDataContext> _lazyInMemoryDatabase;
21+
private Lazy<IStottSecurityDataContext> _lazyInMemoryDatabase;
2222

2323
private CorsSettingsRepository _repository;
2424

@@ -27,7 +27,7 @@ public void SetUp()
2727
{
2828
_inMemoryDatabase = TestDataContextFactory.Create();
2929

30-
_lazyInMemoryDatabase = new Lazy<ICspDataContext>(() => _inMemoryDatabase);
30+
_lazyInMemoryDatabase = new Lazy<IStottSecurityDataContext>(() => _inMemoryDatabase);
3131

3232
_repository = new CorsSettingsRepository(_lazyInMemoryDatabase);
3333
}

src/Stott.Security.Optimizely.Test/Features/Csp/Permissions/Repository/CspPermissionRepositoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public sealed class CspPermissionRepositoryTests
1919
{
2020
private TestDataContext _inMemoryDatabase;
2121

22-
private Lazy<ICspDataContext> _lazyInMemoryDatabase;
22+
private Lazy<IStottSecurityDataContext> _lazyInMemoryDatabase;
2323

2424
private CspPermissionRepository _repository;
2525

@@ -28,7 +28,7 @@ public void SetUp()
2828
{
2929
_inMemoryDatabase = TestDataContextFactory.Create();
3030

31-
_lazyInMemoryDatabase = new Lazy<ICspDataContext>(() => _inMemoryDatabase);
31+
_lazyInMemoryDatabase = new Lazy<IStottSecurityDataContext>(() => _inMemoryDatabase);
3232

3333
_repository = new CspPermissionRepository(_lazyInMemoryDatabase);
3434
}

src/Stott.Security.Optimizely.Test/Features/Csp/Reporting/Repository/CspViolationReportRepositoryTests.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class CspViolationReportRepositoryTests
2121
{
2222
private TestDataContext _inMemoryDatabase;
2323

24-
private Lazy<ICspDataContext> _lazyInMemoryDatabase;
24+
private Lazy<IStottSecurityDataContext> _lazyInMemoryDatabase;
2525

2626
private CspViolationReportRepository _repository;
2727

@@ -30,7 +30,7 @@ public void SetUp()
3030
{
3131
_inMemoryDatabase = TestDataContextFactory.Create();
3232

33-
_lazyInMemoryDatabase = new Lazy<ICspDataContext>(() => _inMemoryDatabase);
33+
_lazyInMemoryDatabase = new Lazy<IStottSecurityDataContext>(() => _inMemoryDatabase);
3434

3535
_repository = new CspViolationReportRepository(_lazyInMemoryDatabase);
3636
}
@@ -46,8 +46,8 @@ public async Task TearDown()
4646
public async Task SaveAsync_GivenANullOrEmptyBlockedUri_ThenNoAttemptIsMadeToSaveARecord(string blockedUri)
4747
{
4848
// Arrange
49-
var mockDatabase = new Mock<ICspDataContext>();
50-
var lazyDatabase = new Lazy<ICspDataContext>(() => mockDatabase.Object);
49+
var mockDatabase = new Mock<IStottSecurityDataContext>();
50+
var lazyDatabase = new Lazy<IStottSecurityDataContext>(() => mockDatabase.Object);
5151

5252
_repository = new CspViolationReportRepository(lazyDatabase);
5353

@@ -63,8 +63,8 @@ public async Task SaveAsync_GivenANullOrEmptyBlockedUri_ThenNoAttemptIsMadeToSav
6363
public async Task SaveAsync_GivenANullOrEmptyViolatedDirective_ThenNoAttemptIsMadeToSaveARecord(string violatedDirective)
6464
{
6565
// Arrange
66-
var mockDatabase = new Mock<ICspDataContext>();
67-
var lazyDatabase = new Lazy<ICspDataContext>(() => mockDatabase.Object);
66+
var mockDatabase = new Mock<IStottSecurityDataContext>();
67+
var lazyDatabase = new Lazy<IStottSecurityDataContext>(() => mockDatabase.Object);
6868

6969
_repository = new CspViolationReportRepository(lazyDatabase);
7070

@@ -188,8 +188,8 @@ public async Task GetReportAsync_CorrectlyFiltersBySourceAndDirective(
188188
public async Task DeleteAsync_CorrectlyPassesThresholdIntoTheReportCleanupJob()
189189
{
190190
// Arrange
191-
var mockDatabase = new Mock<ICspDataContext>();
192-
var lazyDatabase = new Lazy<ICspDataContext>(() => mockDatabase.Object);
191+
var mockDatabase = new Mock<IStottSecurityDataContext>();
192+
var lazyDatabase = new Lazy<IStottSecurityDataContext>(() => mockDatabase.Object);
193193

194194
_repository = new CspViolationReportRepository(lazyDatabase);
195195

src/Stott.Security.Optimizely.Test/Features/Csp/Sandbox/Repository/CspSandboxRepositoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public sealed class CspSandboxRepositoryTests
1616
{
1717
private TestDataContext _inMemoryDatabase;
1818

19-
private Lazy<ICspDataContext> _lazyInMemoryDatabase;
19+
private Lazy<IStottSecurityDataContext> _lazyInMemoryDatabase;
2020

2121
private CspSandboxRepository _repository;
2222

@@ -25,7 +25,7 @@ public void SetUp()
2525
{
2626
_inMemoryDatabase = TestDataContextFactory.Create();
2727

28-
_lazyInMemoryDatabase = new Lazy<ICspDataContext>(() => _inMemoryDatabase);
28+
_lazyInMemoryDatabase = new Lazy<IStottSecurityDataContext>(() => _inMemoryDatabase);
2929

3030
_repository = new CspSandboxRepository(_lazyInMemoryDatabase);
3131
}

src/Stott.Security.Optimizely.Test/Features/Csp/Settings/Repository/CspSettingsRepositoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public sealed class CspSettingsRepositoryTests
1818
{
1919
private TestDataContext _inMemoryDatabase;
2020

21-
private Lazy<ICspDataContext> _lazyInMemoryDatabase;
21+
private Lazy<IStottSecurityDataContext> _lazyInMemoryDatabase;
2222

2323
private CspSettingsRepository _repository;
2424

@@ -27,7 +27,7 @@ public void SetUp()
2727
{
2828
_inMemoryDatabase = TestDataContextFactory.Create();
2929

30-
_lazyInMemoryDatabase = new Lazy<ICspDataContext>(() => _inMemoryDatabase);
30+
_lazyInMemoryDatabase = new Lazy<IStottSecurityDataContext>(() => _inMemoryDatabase);
3131

3232
_repository = new CspSettingsRepository(_lazyInMemoryDatabase);
3333
}

src/Stott.Security.Optimizely.Test/Features/CustomHeaders/Repository/CustomHeaderRepositoryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void SetUp()
2424
{
2525
_context = TestDataContextFactory.Create();
2626

27-
var lazyContext = new Lazy<ICspDataContext>(() => _context);
27+
var lazyContext = new Lazy<IStottSecurityDataContext>(() => _context);
2828

2929
_repository = new CustomHeaderRepository(lazyContext);
3030
}

src/Stott.Security.Optimizely.Test/Features/PermissionPolicy/Repository/PermissionPolicyRepositoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Stott.Security.Optimizely.Test.Features.PermissionPolicy.Repository;
1616
[TestFixture]
1717
public sealed class PermissionPolicyRepositoryTests
1818
{
19-
private Lazy<ICspDataContext> _lazyInMemoryDatabase;
19+
private Lazy<IStottSecurityDataContext> _lazyInMemoryDatabase;
2020

2121
private TestDataContext _inMemoryDatabase;
2222

@@ -27,7 +27,7 @@ public void SetUp()
2727
{
2828
_inMemoryDatabase = TestDataContextFactory.Create();
2929

30-
_lazyInMemoryDatabase = new Lazy<ICspDataContext>(() => _inMemoryDatabase);
30+
_lazyInMemoryDatabase = new Lazy<IStottSecurityDataContext>(() => _inMemoryDatabase);
3131

3232
_repository = new PermissionPolicyRepository(_lazyInMemoryDatabase);
3333
}

src/Stott.Security.Optimizely.Test/Features/Tools/MigrationRepositoryDataTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public sealed class MigrationRepositoryDataTests
2121
{
2222
private TestDataContext _inMemoryDatabase;
2323

24-
private Lazy<ICspDataContext> _lazyInMemoryDatabase;
24+
private Lazy<IStottSecurityDataContext> _lazyInMemoryDatabase;
2525

2626
private MigrationRepository _repository;
2727

@@ -30,7 +30,7 @@ public void SetUp()
3030
{
3131
_inMemoryDatabase = TestDataContextFactory.Create();
3232

33-
_lazyInMemoryDatabase = new Lazy<ICspDataContext>(() => _inMemoryDatabase);
33+
_lazyInMemoryDatabase = new Lazy<IStottSecurityDataContext>(() => _inMemoryDatabase);
3434

3535
_repository = new MigrationRepository(_lazyInMemoryDatabase);
3636
}

0 commit comments

Comments
 (0)