|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //using System;
- //using DotNetCore.CAP.Infrastructure;
- //using DotNetCore.CAP.Store;
- //using DotNetCore.CAP.Test;
- //using Microsoft.AspNetCore.Testing;
- //using Microsoft.Extensions.DependencyInjection;
- //using Xunit;
-
- //namespace DotNetCore.CAP.EntityFrameworkCore.Test
- //{
- // public class MessageStoreWithGenericsTest : MessageManagerTestBase<MessageWithGenerics, string>, IClassFixture<ScratchDatabaseFixture>
- // {
- // private readonly ScratchDatabaseFixture _fixture;
-
- // public MessageStoreWithGenericsTest(ScratchDatabaseFixture fixture) {
- // _fixture = fixture;
- // }
-
- // protected override void AddMessageStore(IServiceCollection services, object context = null) {
- // services.AddSingleton<IConsistencyMessageStore>(new MessageStoreWithGenerics((ContextWithGenerics)context));
- // }
-
- // protected override object CreateTestContext() {
- // return CreateContext();
- // }
-
- // public ContextWithGenerics CreateContext() {
- // var db = DbUtil.Create<ContextWithGenerics>(_fixture.ConnectionString);
- // db.Database.EnsureCreated();
- // return db;
- // }
-
- // protected override MessageWithGenerics CreateTestMessage(string payload = "") {
- // return new MessageWithGenerics() {
- // Payload = payload,
- // SendTime = DateTime.Now,
- // Status = MessageStatus.WaitForSend,
- // UpdateTime = DateTime.Now
- // };
- // }
-
- // protected override bool ShouldSkipDbTests() {
- // return TestPlatformHelper.IsMono || !TestPlatformHelper.IsWindows;
- // }
- // }
-
- // public class MessageWithGenerics : ConsistencyMessage
- // {
- // }
-
- // public class MessageStoreWithGenerics : ConsistencyMessageStore<ContextWithGenerics>
- // {
- // public MessageStoreWithGenerics(ContextWithGenerics context) : base(context) {
- // }
- // }
-
- // public class ContextWithGenerics : ConsistencyDbContext
- // {
- // public ContextWithGenerics() {
- // }
- // }
- //}
|