-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from wemogy/56-soft-delete-gets-implicitly-ena…
…bled-by-inheriting-from-entitybase Fix Soft-Delete gets implicitly enabled by inheriting from EntityBase
- Loading branch information
Showing
14 changed files
with
153 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...mogy.Infrastructure.Database.Core.UnitTests/DatabaseRepositories/IDataCenterRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Wemogy.Infrastructure.Database.Core.Abstractions; | ||
using Wemogy.Infrastructure.Database.Core.UnitTests.Fakes.Entities; | ||
|
||
namespace Wemogy.Infrastructure.Database.Core.UnitTests.DatabaseRepositories | ||
{ | ||
public interface IDataCenterRepository : IDatabaseRepository<DataCenter> | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/core/Wemogy.Infrastructure.Database.Core.UnitTests/Fakes/Entities/DataCenter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using Bogus; | ||
using Wemogy.Infrastructure.Database.Core.Abstractions; | ||
using Wemogy.Infrastructure.Database.Core.Attributes; | ||
|
||
namespace Wemogy.Infrastructure.Database.Core.UnitTests.Fakes.Entities | ||
{ | ||
public class DataCenter : EntityBase | ||
{ | ||
public string Location { get; set; } | ||
|
||
[PartitionKey] | ||
public string PartitionKey { get; set; } | ||
|
||
public DataCenter() | ||
: base(Guid.NewGuid().ToString()) | ||
{ | ||
Location = string.Empty; | ||
PartitionKey = string.Empty; | ||
} | ||
|
||
public static Faker<DataCenter> Faker | ||
{ | ||
get | ||
{ | ||
return new Faker<DataCenter>() | ||
.RuleFor( | ||
x => x.PartitionKey, | ||
f => f.Random.Guid().ToString()) | ||
.RuleFor( | ||
x => x.Location, | ||
f => f.Address.Country()) | ||
.RuleFor( | ||
x => x.IsDeleted, | ||
f => false); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/core/Wemogy.Infrastructure.Database.Core.UnitTests/Providers/DataCenterTenantProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using Wemogy.Infrastructure.Database.Core.Plugins.MultiTenantDatabase.Abstractions; | ||
|
||
namespace Wemogy.Infrastructure.Database.Core.UnitTests.Providers; | ||
|
||
public class DataCenterTenantProvider : IDatabaseTenantProvider | ||
{ | ||
public string GetTenantId() => "datacenter-staging"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters