瀏覽代碼

refactor unit tests

master
Savorboard 7 年之前
父節點
當前提交
43e55ced97
共有 2 個檔案被更改,包括 5 行新增5 行删除
  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 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存