Skip to content

Commit 31bf2ae

Browse files
committed
Added tests for Extensions.ToGlobalRequestName.
1 parent fbff2e5 commit 31bf2ae

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using Microsoft.VisualStudio.TestTools.UnitTesting;
6+
using Renci.SshNet.Messages.Connection;
7+
8+
namespace Renci.SshNet.Tests.Classes.Common
9+
{
10+
[TestClass]
11+
public class ExtensionsTest_ToGlobalRequestName
12+
{
13+
[TestMethod]
14+
public void TcpipForward()
15+
{
16+
var data = Encoding.ASCII.GetBytes("tcpip-forward");
17+
18+
var actual = data.ToGlobalRequestName();
19+
20+
Assert.AreEqual(GlobalRequestName.TcpIpForward, actual);
21+
}
22+
23+
[TestMethod]
24+
public void CancelTcpipForward()
25+
{
26+
var data = Encoding.ASCII.GetBytes("cancel-tcpip-forward");
27+
28+
var actual = data.ToGlobalRequestName();
29+
30+
Assert.AreEqual(GlobalRequestName.CancelTcpIpForward, actual);
31+
}
32+
33+
}
34+
}

0 commit comments

Comments
 (0)