mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 17:25:51 +00:00
c0a353a4de
* Preparation to enforce formatting and style in CI - enabled IDE0055 to enforce formatting on build - disabled SA1137 and SA1025 because they are already covered by IDE0055 - disabled SA1021 because it conflicts with csharp_space_after_cast * Cleanup formatting and style on codebase This commit has no manual changes, it is the result of running "dotnet format whitespace" and "dotnet format style" * new formatting fixes after merge * appveyor: set git autocrlf as suggested by sharwell to hopefully fix Windows CI. * use autocrlf input to hopefully fix Linux tests * fix formatting * use autocrlf input for Linux only * set csharp_space_after_cast to false * Revert SA1021 suppression --------- Co-authored-by: Robert Hague <rh@johnstreetcapital.com>
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using System.Text;
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
using Renci.SshNet.Messages.Connection;
|
|
using Renci.SshNet.Tests.Common;
|
|
|
|
namespace Renci.SshNet.Tests.Classes.Messages.Connection
|
|
{
|
|
/// <summary>
|
|
///This is a test class for GlobalRequestMessageTest and is intended
|
|
///to contain all GlobalRequestMessageTest Unit Tests
|
|
///</summary>
|
|
[TestClass]
|
|
public class GlobalRequestMessageTest : TestBase
|
|
{
|
|
[TestMethod]
|
|
public void DefaultCtor()
|
|
{
|
|
new GlobalRequestMessage();
|
|
}
|
|
|
|
[TestMethod]
|
|
public void Ctor_RequestNameAndWantReply()
|
|
{
|
|
var requestName = new Random().Next().ToString(CultureInfo.InvariantCulture);
|
|
|
|
var target = new GlobalRequestMessage(Encoding.ASCII.GetBytes(requestName), true);
|
|
Assert.AreEqual(requestName, target.RequestName);
|
|
Assert.IsTrue(target.WantReply);
|
|
|
|
target = new GlobalRequestMessage(Encoding.ASCII.GetBytes(requestName), false);
|
|
Assert.AreEqual(requestName, target.RequestName);
|
|
Assert.IsFalse(target.WantReply);
|
|
}
|
|
}
|
|
}
|