public void ServerCompressionAlgorithmTest() { int errorCode = int.MaxValue; RasCompressionType compressionAlgorithm = RasCompressionType.Mppc; RasCompressionOptions options = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption128Bit); RasCompressionType expected = RasCompressionType.Stac; RasCompressionOptions serverOptions = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption40Bit); RasCcpInfo target = new RasCcpInfo(errorCode, compressionAlgorithm, options, expected, serverOptions); RasCompressionType actual; actual = target.ServerCompressionAlgorithm; Assert.AreEqual(expected, actual); }
public void GetProjectionInfoCcpTest() { RasCcpInfo expected = new RasCcpInfo( 0, RasCompressionType.None, new RasCompressionOptions(NativeMethods.RASCCPO.None), RasCompressionType.None, new RasCompressionOptions(NativeMethods.RASCCPO.None)); Mock<IRasHelper> mock = new Mock<IRasHelper>(); RasHelper.Instance = mock.Object; mock.Setup(o => o.GetProjectionInfo(It.IsAny<RasHandle>(), NativeMethods.RASPROJECTION.Ccp)).Returns(expected); RasConnection target = new RasConnection(); RasCcpInfo actual = (RasCcpInfo)target.GetProjectionInfo(RasProjectionType.Ccp); Assert.AreSame(expected, actual); }
public void RasCcpInfoConstructorTest() { int errorCode = int.MaxValue; RasCompressionType compressionAlgorithm = RasCompressionType.Mppc; RasCompressionOptions options = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption128Bit); RasCompressionType serverCompressionAlgorithm = RasCompressionType.Stac; RasCompressionOptions serverOptions = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption40Bit); RasCcpInfo target = new RasCcpInfo(errorCode, compressionAlgorithm, options, serverCompressionAlgorithm, serverOptions); Assert.IsNotNull(target); }