forked from Code-Sharp/uHttpSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpMethodProviderTests.cs
More file actions
42 lines (34 loc) · 933 Bytes
/
HttpMethodProviderTests.cs
File metadata and controls
42 lines (34 loc) · 933 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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
namespace uhttpsharp.Tests
{
[TestFixture]
public class HttpMethodProviderTests
{
private static IHttpMethodProvider GetTarget()
{
return new HttpMethodProvider();
}
private IEnumerable<string> Methods
{
get
{
return Enum.GetNames(typeof(HttpMethods));
}
}
[TestCaseSource("Methods")]
public void Should_Get_Right_Method(string methodName)
{
// Arrange
var target = GetTarget();
// Act
var actual = target.Provide(methodName);
// Assert
Assert.IsTrue(StringComparer.InvariantCultureIgnoreCase.Equals(actual.ToString(), methodName));
}
}
}