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.

RandomTests.cs 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. namespace Luticate2.Auth.Tests
  2. {
  3. public class RandomTests
  4. {
  5. // [Fact]
  6. // public void Test1()
  7. // {
  8. // var dbContext = new luticate2Context();
  9. // var items = dbContext.LuGroups.Where(groups => groups.LuGroupsObjects.Any(x => x.Priority == 0));
  10. // var list = items.ToList();
  11. // Assert.NotNull(list);
  12. // Assert.Equal(1, list.Count);
  13. // }
  14. //
  15. // [Fact]
  16. // public void Test2()
  17. // {
  18. // var dbContext = new luticate2Context();
  19. // var items = dbContext.LuGroups.OrderBy(x => x.Id).Where(groups => groups.LuGroupsObjects.Any(x => x.Priority == 0));
  20. // var list = items.ToList();
  21. // Assert.NotNull(list);
  22. // Assert.Equal(1, list.Count);
  23. // }
  24. //
  25. // [Fact]
  26. // public void Test3()
  27. // {
  28. // var dbContext = new luticate2Context();
  29. // var items = dbContext.LuGroups.OrderBy(x => x.Id);
  30. // var list = items.ToList();
  31. // Assert.NotNull(list);
  32. // Assert.Equal(2, list.Count);
  33. // }
  34. // protected void AddILuExpressionConverter<TTypeFrom, TTypeTo, TTypeImpl>(IServiceCollection services)
  35. // where TTypeImpl : class, ILuExpressionConverter<TTypeFrom, TTypeTo>
  36. // {
  37. // services.AddSingleton<ILuExpressionConverter<TTypeFrom, TTypeTo>, TTypeImpl>();
  38. // services.TryAddSingleton<ILuExpressionConverter<TTypeFrom>, TTypeImpl>();
  39. // }
  40. // [Fact]
  41. // public void Test()
  42. // {
  43. //// var parentScopeVar = new TestDbo1();
  44. //// Expression<Func<TestDbo2, Guid>> expDbo = (x => parentScopeVar.Id);
  45. //// var type = typeof(ILuObjectConverterDescriptor<,>);
  46. //// var gtype = type.MakeGenericType(typeof(int), typeof(Enumerable));
  47. // }
  48. }
  49. }