29 lines
629 B
C#
29 lines
629 B
C#
using Database;
|
|
using Database.Repository;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace IntegrationTests;
|
|
|
|
public class PosDbContextTests
|
|
{
|
|
private readonly ITestOutputHelper _output;
|
|
|
|
public PosDbContextTests(ITestOutputHelper output)
|
|
{
|
|
_output = output;
|
|
}
|
|
|
|
[Fact]
|
|
public void EmployeeRepository_ShouldReturnEmployees()
|
|
{
|
|
using var repository = new EmployeeRepository();
|
|
|
|
var employees = repository.GetAll();
|
|
|
|
_output.WriteLine(
|
|
$"Antal medarbejdere hentet: {employees.Count}");
|
|
|
|
Assert.NotEmpty(employees);
|
|
}
|
|
} |