Skip to content

Commit

Permalink
Move Insert_Should_Set_Guid_Id test method to repository test base cl…
Browse files Browse the repository at this point in the history
  • Loading branch information
maliming committed Jul 17, 2020
1 parent cce1610 commit a6329f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,5 @@ public override async Task InsertAsync()
person.Phones.Count.ShouldBe(1);
person.Phones.Any(p => p.PersonId == person.Id && p.Number == "1234567890").ShouldBeTrue();
}

[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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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
{
protected readonly IRepository<Person, Guid> PersonRepository;
Expand Down Expand Up @@ -105,5 +105,15 @@ public virtual async Task InsertAsync()
var person = await PersonRepository.FindAsync(personId);
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);
}
}
}

0 comments on commit a6329f4

Please sign in to comment.