forked from scriptcs/scriptcs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptPackResolverTests.cs
More file actions
35 lines (32 loc) · 995 Bytes
/
ScriptPackResolverTests.cs
File metadata and controls
35 lines (32 loc) · 995 Bytes
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
using System.Linq;
using Moq;
using ScriptCs.Contracts;
using Should;
using Xunit;
namespace ScriptCs.Tests
{
public class ScriptPackResolverTests
{
public class TheGetPacksMethod
{
private ScriptPackResolver _packManager;
private Mock<IScriptPack> _pack1;
private Mock<IScriptPack> _pack2;
public TheGetPacksMethod()
{
_pack1 = new Mock<IScriptPack>();
_pack2 = new Mock<IScriptPack>();
var packs = new[] { _pack1.Object, _pack2.Object };
_packManager = new ScriptPackResolver(packs);
}
[Fact]
public void ShouldRetrieveAnyPacksInTheCatalog()
{
var packs = _packManager.GetPacks();
packs.Count().ShouldEqual(2);
packs.ShouldContain(_pack1.Object);
packs.ShouldContain(_pack2.Object);
}
}
}
}