diff --git a/services/catalog/test/EShopOnAbp.CatalogService.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepositoryTests.cs b/services/catalog/test/EShopOnAbp.CatalogService.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepositoryTests.cs deleted file mode 100644 index 82d161af..00000000 --- a/services/catalog/test/EShopOnAbp.CatalogService.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepositoryTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Shouldly; -using System; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.Identity; -using Xunit; - -namespace EShopOnAbp.CatalogService.EntityFrameworkCore.Samples -{ - /* This is just an example test class. - * Normally, you don't test ABP framework code - * (like default AppUser repository IRepository here). - * Only test your custom repository methods. - */ - public class SampleRepositoryTests : CatalogServiceEntityFrameworkCoreTestBase - { - private readonly IRepository _appUserRepository; - - public SampleRepositoryTests() - { - _appUserRepository = GetRequiredService>(); - } - - [Fact] - public async Task Should_Query_AppUser() - { - /* Need to manually start Unit Of Work because - * FirstOrDefaultAsync should be executed while db connection / context is available. - */ - await WithUnitOfWorkAsync(async () => - { - //Act - var adminUser = await (await _appUserRepository.GetQueryableAsync()) - .Where(u => u.UserName == "admin") - .FirstOrDefaultAsync(); - - //Assert - adminUser.ShouldNotBeNull(); - }); - } - } -}