forked from scriptcs/scriptcs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptHostTests.cs
More file actions
36 lines (33 loc) · 1.07 KB
/
ScriptHostTests.cs
File metadata and controls
36 lines (33 loc) · 1.07 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ScriptCs.Contracts;
using ScriptCs;
using Xunit;
using Should;
using Moq;
namespace ScriptCs.Tests
{
public class ScriptHostTests
{
public class TheGetMethod
{
private Mock<IScriptPackContext> _mockContext = new Mock<IScriptPackContext>();
private Mock<IScriptPackManager> _mockScriptPackManager = new Mock<IScriptPackManager>();
private ScriptHost _scriptHost;
public TheGetMethod()
{
_scriptHost = new ScriptHost(_mockScriptPackManager.Object);
_mockScriptPackManager.Setup(s => s.Get<IScriptPackContext>()).Returns(_mockContext.Object);
}
[Fact]
public void ShoulGetScriptPackFromScriptPackManagerWhenInvoked()
{
var result = _scriptHost.Require<IScriptPackContext>();
_mockScriptPackManager.Verify(s=>s.Get<IScriptPackContext>());
}
}
}
}