forked from FortuneN/FineCodeCoverage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCoverletDataCollectorUtil_Initialize_Tests.cs
More file actions
36 lines (29 loc) · 1.1 KB
/
CoverletDataCollectorUtil_Initialize_Tests.cs
File metadata and controls
36 lines (29 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.IO;
using System.Threading;
using AutoMoq;
using FineCodeCoverage.Core.Utilities;
using FineCodeCoverage.Engine.Coverlet;
using NUnit.Framework;
namespace Test
{
public class CoverletDataCollectorUtil_Initialize_Tests
{
private AutoMoqer mocker;
private CoverletDataCollectorUtil coverletDataCollector;
[SetUp]
public void SetUp()
{
mocker = new AutoMoqer();
coverletDataCollector = mocker.Create<CoverletDataCollectorUtil>();
}
[Test]
public void Should_Ensure_Unzipped_And_Sets_The_Quoted_TestAdapterPathArg()
{
var ct = CancellationToken.None;
var mockToolFolder = mocker.GetMock<IToolUnzipper>();
mockToolFolder.Setup(cf => cf.EnsureUnzipped("appdatafolder", "coverletCollector", "coverlet.collector",ct)).Returns("zipdestination");
coverletDataCollector.Initialize("appdatafolder",ct);
Assert.AreEqual($@"""{Path.Combine("zipdestination", "build", "netstandard2.0")}""", coverletDataCollector.TestAdapterPathArg);
}
}
}