|
|
@ -8,7 +8,7 @@ using Xunit; |
|
|
|
|
|
|
|
|
namespace Volo.Abp.TestApp.Testing |
|
|
namespace Volo.Abp.TestApp.Testing |
|
|
{ |
|
|
{ |
|
|
public abstract class Repository_Basic_Tests<TStartupModule> : TestAppTestBase<TStartupModule> |
|
|
public abstract class Repository_Basic_Tests<TStartupModule> : TestAppTestBase<TStartupModule> |
|
|
where TStartupModule : IAbpModule |
|
|
where TStartupModule : IAbpModule |
|
|
{ |
|
|
{ |
|
|
protected readonly IRepository<Person, Guid> PersonRepository; |
|
|
protected readonly IRepository<Person, Guid> PersonRepository; |
|
|
@ -105,5 +105,15 @@ namespace Volo.Abp.TestApp.Testing |
|
|
var person = await PersonRepository.FindAsync(personId); |
|
|
var person = await PersonRepository.FindAsync(personId); |
|
|
person.ShouldNotBeNull(); |
|
|
person.ShouldNotBeNull(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
|
|
public async Task Insert_Should_Set_Guid_Id() |
|
|
|
|
|
{ |
|
|
|
|
|
var person = new Person(Guid.Empty, "New Person", 35); |
|
|
|
|
|
|
|
|
|
|
|
await PersonRepository.InsertAsync(person); |
|
|
|
|
|
|
|
|
|
|
|
person.Id.ShouldNotBe(Guid.Empty); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|