using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AsbCloudWebApi.Tests { internal static class TestHelpter { public static AsbCloudDbContext MakeTestContext() { var options = new DbContextOptionsBuilder() .UseNpgsql("Host=localhost;Database=tests;Username=postgres;Password=q;Persist Security Info=True;Include Error Detail=True") .Options; var context = new AsbCloudDbContext(options); context.Database.Migrate(); return context; } } }