You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Tests.cs 630B

1234567891011121314151617181920212223
  1. using System;
  2. using Luticate2.Auth.DataAccess;
  3. namespace Test.Auth
  4. {
  5. public class Tests
  6. {
  7. public static LuDatabaseContext GetDataBaseContext()
  8. {
  9. return
  10. new LuDatabaseContext(
  11. "User ID=dev;Password=dev;Host=localhost;Port=5432;Database=luticate2;Pooling=true;");
  12. }
  13. public static void TestRealDb(Action<LuDatabaseContext> func)
  14. {
  15. var dbContext = GetDataBaseContext();
  16. dbContext.Database.BeginTransaction();
  17. func(dbContext);
  18. dbContext.Database.RollbackTransaction();
  19. }
  20. }
  21. }