Bladeren bron

removed unused files.

undefined
Savorboard 6 jaren geleden
bovenliggende
commit
027156c568
1 gewijzigde bestanden met toevoegingen van 0 en 83 verwijderingen
  1. +0
    -83
      test/DotNetCore.CAP.Test/Processor/DefaultDispatcherTest.cs

+ 0
- 83
test/DotNetCore.CAP.Test/Processor/DefaultDispatcherTest.cs Bestand weergeven

@@ -1,83 +0,0 @@
//using System;
//using System.Threading;
//using System.Threading.Tasks;
//using DotNetCore.CAP.Models;
//using DotNetCore.CAP.Processor;
//using Microsoft.Extensions.DependencyInjection;
//using Microsoft.Extensions.Options;
//using Moq;
//using Xunit;

//namespace DotNetCore.CAP.Test
//{
// public class DefaultDispatcherTest
// {
// private CancellationTokenSource _cancellationTokenSource;
// private ProcessingContext _context;
// private IServiceProvider _provider;
// private Mock<IStorageConnection> _mockStorageConnection;

// public DefaultDispatcherTest()
// {
// _mockStorageConnection = new Mock<IStorageConnection>();
// _cancellationTokenSource = new CancellationTokenSource();

// var services = new ServiceCollection();
// services.AddLogging();
// services.Configure<IOptions<CapOptions>>(x => { });
// services.AddOptions();
// services.AddSingleton(_mockStorageConnection.Object);
// _provider = services.BuildServiceProvider();

// _context = new ProcessingContext(_provider, _cancellationTokenSource.Token);
// }

// [Fact]
// public void MockTest()
// {
// Assert.NotNull(_provider.GetServices<IStorageConnection>());
// }

// [Fact]
// public async void ProcessAsync_CancellationTokenCancelled_ThrowsImmediately()
// {
// // Arrange
// _cancellationTokenSource.Cancel();
// var fixture = Create();

// // Act
// await Assert.ThrowsAsync<OperationCanceledException>(() => fixture.ProcessAsync(_context));
// }

// [Fact]
// public async Task ProcessAsync()
// {
// // Arrange
// var job = new CapPublishedMessage
// {
// };

// var mockFetchedJob = Mock.Get(Mock.Of<IFetchedMessage>(fj => fj.MessageId == 42 && fj.MessageType == MessageType.Publish));

// _mockStorageConnection
// .Setup(m => m.FetchNextMessageAsync())
// .ReturnsAsync(mockFetchedJob.Object).Verifiable();

// _mockQueueExecutor
// .Setup(x => x.ExecuteAsync(_mockStorageConnection.Object, mockFetchedJob.Object))
// .Returns(Task.FromResult(OperateResult.Success));

// var fixture = Create();

// // Act
// await fixture.ProcessAsync(_context);

// // Assert
// _mockStorageConnection.VerifyAll();
// }

// private DefaultDispatcher Create()
// => _provider.GetService<DefaultDispatcher>();
// }
//}

Laden…
Annuleren
Opslaan