forked from roryprimrose/Neovolve.Streamline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSingleParameter.cs
More file actions
43 lines (35 loc) · 890 Bytes
/
SingleParameter.cs
File metadata and controls
43 lines (35 loc) · 890 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
36
37
38
39
40
41
42
43
namespace Examples
{
using System;
using FluentAssertions;
using NSubstitute;
using Xunit;
public interface IDoSomething
{
string DoSomething(Guid id);
}
public class SingleParameter
{
private readonly IDoSomething _something;
public SingleParameter(IDoSomething something)
{
_something = something;
}
public string Run(Guid id)
{
return _something.DoSomething(id);
}
}
public class SingleParameterTests : Tests<SingleParameter>
{
[Fact]
public void Test1()
{
var id = Guid.NewGuid();
var expected = Guid.NewGuid().ToString();
Service<IDoSomething>().DoSomething(id).Returns(expected);
var actual = SUT.Run(id);
actual.Should().Be(expected);
}
}
}