Beispiel #1
0
        public async Task GetAllListingAsync_WithSearchTokenAndWithPage_ShouldReturnPagedUsers()
        {
            // Arrange
            FitStoreDbContext database = this.Database;

            DatabaseHelper.SeedData(database);

            IAdminUserService adminUserService = new AdminUserService(database);

            // Act
            IEnumerable <AdminUserBasicServiceModel> result = await adminUserService.GetAllListingAsync("user", page);

            // Assert
            result.Count().Should().Be(5);
            result.First().Id.Should().Be(firstUserId);
            result.First().Username.Should().Be(firstUsername);
            result.Last().Id.Should().Be(lastUserId);
            result.Last().Username.Should().Be(lastUsername);
        }