From 921f73b6d560a1e0a9688e36bb866b0facf5be34 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Wed, 9 Sep 2020 19:53:39 -0400 Subject: [PATCH] added test --- .../RetrieveTweetsProcessorTests.cs | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/Tests/BirdsiteLive.Pipeline.Tests/Processors/RetrieveTweetsProcessorTests.cs diff --git a/src/Tests/BirdsiteLive.Pipeline.Tests/Processors/RetrieveTweetsProcessorTests.cs b/src/Tests/BirdsiteLive.Pipeline.Tests/Processors/RetrieveTweetsProcessorTests.cs new file mode 100644 index 0000000..61ba804 --- /dev/null +++ b/src/Tests/BirdsiteLive.Pipeline.Tests/Processors/RetrieveTweetsProcessorTests.cs @@ -0,0 +1,41 @@ +using BirdsiteLive.DAL.Contracts; +using BirdsiteLive.DAL.Models; +using BirdsiteLive.Pipeline.Processors; +using BirdsiteLive.Twitter; +using Castle.DynamicProxy.Generators.Emitters; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Moq; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace BirdsiteLive.Pipeline.Tests.Processors +{ + [TestClass] + class RetrieveTweetsProcessorTests + { + [TestMethod] + public async Task ProcessAsync_Test() + { + var users = new List + { + new SyncTwitterUser { Id = 1 }, + new SyncTwitterUser { Id = 2 }, + new SyncTwitterUser { Id = 3 }, + }; + + var twitterServiceMock = new Mock(MockBehavior.Strict); + var twitterUserDalMock = new Mock(MockBehavior.Strict); + + var procesor = new RetrieveTweetsProcessor(twitterServiceMock.Object, twitterUserDalMock.Object); + + var result = await procesor.ProcessAsync(users.ToArray(), CancellationToken.None); + + + + } + + } +}