您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

RandomTests.cs 1.9KB

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