26 lines
683 B
C#
26 lines
683 B
C#
using System.Text;
|
|
using System.Text.Json;
|
|
using Microsoft.Data.Sqlite;
|
|
using Xunit;
|
|
|
|
namespace JobTrackerApi.Tests;
|
|
|
|
public sealed class SqliteMigrationHelperTests
|
|
{
|
|
[Fact]
|
|
public void Export_payload_shape_can_be_serialized()
|
|
{
|
|
var payload = new
|
|
{
|
|
users = new[] { new { Id = "u1", Email = "u@example.com" } },
|
|
companies = new[] { new { Id = 1, Name = "Acme" } },
|
|
jobs = new[] { new { Id = 1, JobTitle = "Backend Dev" } }
|
|
};
|
|
|
|
var json = JsonSerializer.Serialize(payload);
|
|
Assert.Contains("users", json);
|
|
Assert.Contains("companies", json);
|
|
Assert.Contains("jobs", json);
|
|
}
|
|
}
|