mirror of https://github.com/abpframework/abp.git
5 changed files with 78 additions and 0 deletions
@ -0,0 +1,8 @@ |
|||
using Volo.Abp.TestApp.Testing; |
|||
|
|||
namespace Volo.Abp.EntityFrameworkCore.Domain |
|||
{ |
|||
public class ConcurrencyStamp_Tests : ConcurrencyStamp_Tests<AbpEntityFrameworkCoreTestModule> |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.TestApp.Domain; |
|||
using Xunit; |
|||
|
|||
namespace Volo.Abp.TestApp.Testing |
|||
{ |
|||
public class ConcurrencyStamp_Tests<TStartupModule> : TestAppTestBase<TStartupModule> |
|||
where TStartupModule : IAbpModule |
|||
{ |
|||
protected readonly ICityRepository CityRepository; |
|||
|
|||
public ConcurrencyStamp_Tests() |
|||
{ |
|||
CityRepository = GetRequiredService<ICityRepository>(); |
|||
} |
|||
|
|||
[Fact] |
|||
public async Task Should_Not_Allow_To_Update_If_The_Entity_Has_Changed() |
|||
{ |
|||
var london = await CityRepository.FindByNameAsync("London"); |
|||
london.Name = "London-1"; |
|||
await CityRepository.UpdateAsync(london); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue