Browse Source

refactor unit tests

master
Savorboard 7 years ago
parent
commit
43e55ced97
2 changed files with 5 additions and 5 deletions
  1. +4
    -1
      test/DotNetCore.CAP.Test/ModelBinderFactoryTest.cs
  2. +1
    -4
      test/DotNetCore.CAP.Test/QueueExecutorFactoryTest.cs

+ 4
- 1
test/DotNetCore.CAP.Test/ModelBinderFactoryTest.cs View File

@@ -1,6 +1,8 @@
using System.Linq;
using System.Reflection;
using DotNetCore.CAP.Abstractions;
using DotNetCore.CAP.Internal;
using Moq;
using Xunit;

namespace DotNetCore.CAP.Test
@@ -11,7 +13,8 @@ namespace DotNetCore.CAP.Test

public ModelBinderFactoryTest()
{
_factory = new ModelBinderFactory();
var serializer = Mock.Of<IContentSerializer>();
_factory = new ModelBinderFactory(serializer);
}

[Theory]


+ 1
- 4
test/DotNetCore.CAP.Test/QueueExecutorFactoryTest.cs View File

@@ -15,10 +15,7 @@ namespace DotNetCore.CAP.Test
var services = new ServiceCollection();
services.AddLogging();
services.AddOptions();

var callbackSender = Mock.Of<ICallbackMessageSender>();

services.AddSingleton(callbackSender);
services.AddCap(x => { });
_provider = services.BuildServiceProvider();
}


Loading…
Cancel
Save