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.
 
 
 

62 lines
2.1 KiB

  1. //using System;
  2. //using DotNetCore.CAP.Infrastructure;
  3. //using DotNetCore.CAP.Store;
  4. //using DotNetCore.CAP.Test;
  5. //using Microsoft.AspNetCore.Testing;
  6. //using Microsoft.Extensions.DependencyInjection;
  7. //using Xunit;
  8. //namespace DotNetCore.CAP.EntityFrameworkCore.Test
  9. //{
  10. // public class MessageStoreWithGenericsTest : MessageManagerTestBase<MessageWithGenerics, string>, IClassFixture<ScratchDatabaseFixture>
  11. // {
  12. // private readonly ScratchDatabaseFixture _fixture;
  13. // public MessageStoreWithGenericsTest(ScratchDatabaseFixture fixture) {
  14. // _fixture = fixture;
  15. // }
  16. // protected override void AddMessageStore(IServiceCollection services, object context = null) {
  17. // services.AddSingleton<IConsistencyMessageStore>(new MessageStoreWithGenerics((ContextWithGenerics)context));
  18. // }
  19. // protected override object CreateTestContext() {
  20. // return CreateContext();
  21. // }
  22. // public ContextWithGenerics CreateContext() {
  23. // var db = DbUtil.Create<ContextWithGenerics>(_fixture.ConnectionString);
  24. // db.Database.EnsureCreated();
  25. // return db;
  26. // }
  27. // protected override MessageWithGenerics CreateTestMessage(string payload = "") {
  28. // return new MessageWithGenerics() {
  29. // Payload = payload,
  30. // SendTime = DateTime.Now,
  31. // Status = MessageStatus.WaitForSend,
  32. // UpdateTime = DateTime.Now
  33. // };
  34. // }
  35. // protected override bool ShouldSkipDbTests() {
  36. // return TestPlatformHelper.IsMono || !TestPlatformHelper.IsWindows;
  37. // }
  38. // }
  39. // public class MessageWithGenerics : ConsistencyMessage
  40. // {
  41. // }
  42. // public class MessageStoreWithGenerics : ConsistencyMessageStore<ContextWithGenerics>
  43. // {
  44. // public MessageStoreWithGenerics(ContextWithGenerics context) : base(context) {
  45. // }
  46. // }
  47. // public class ContextWithGenerics : ConsistencyDbContext
  48. // {
  49. // public ContextWithGenerics() {
  50. // }
  51. // }
  52. //}