Addet integration test
This commit is contained in:
29
PointOfSale/IntegrationTests/PosDbContextTests.cs
Normal file
29
PointOfSale/IntegrationTests/PosDbContextTests.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user