| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201 | using Microsoft.VisualStudio.TestTools.UnitTesting;using Renci.SshNet.Sftp;using Renci.SshNet.Tests.Common;using Renci.SshNet.Tests.Properties;using System;using System.Collections.Generic;using System.IO;using System.Security.Cryptography;using System.Text;namespace Renci.SshNet.Tests.Classes{    /// <summary>    /// Implementation of the SSH File Transfer Protocol (SFTP) over SSH.    /// </summary>    [TestClass]    public partial class SftpClientTest : TestBase    {        /// <summary>        ///A test for SftpClient Constructor        ///</summary>        [TestMethod()]        public void SftpClientConstructorTest()        {            string host = string.Empty; // TODO: Initialize to an appropriate value            string username = string.Empty; // TODO: Initialize to an appropriate value            PrivateKeyFile[] keyFiles = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(host, username, keyFiles);            Assert.Inconclusive("TODO: Implement code to verify target");        }        /// <summary>        ///A test for SftpClient Constructor        ///</summary>        [TestMethod()]        public void SftpClientConstructorTest1()        {            string host = string.Empty; // TODO: Initialize to an appropriate value            int port = 0; // TODO: Initialize to an appropriate value            string username = string.Empty; // TODO: Initialize to an appropriate value            PrivateKeyFile[] keyFiles = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(host, port, username, keyFiles);            Assert.Inconclusive("TODO: Implement code to verify target");        }        /// <summary>        ///A test for SftpClient Constructor        ///</summary>        [TestMethod()]        public void SftpClientConstructorTest2()        {            string host = string.Empty; // TODO: Initialize to an appropriate value            string username = string.Empty; // TODO: Initialize to an appropriate value            string password = string.Empty; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(host, username, password);            Assert.Inconclusive("TODO: Implement code to verify target");        }        /// <summary>        ///A test for SftpClient Constructor        ///</summary>        [TestMethod()]        public void SftpClientConstructorTest3()        {            string host = string.Empty; // TODO: Initialize to an appropriate value            int port = 0; // TODO: Initialize to an appropriate value            string username = string.Empty; // TODO: Initialize to an appropriate value            string password = string.Empty; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(host, port, username, password);            Assert.Inconclusive("TODO: Implement code to verify target");        }        /// <summary>        ///A test for SftpClient Constructor        ///</summary>        [TestMethod()]        public void SftpClientConstructorTest4()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo);            Assert.Inconclusive("TODO: Implement code to verify target");        }        /// <summary>        ///A test for ChangePermissions        ///</summary>        [TestMethod()]        public void ChangePermissionsTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            short mode = 0; // TODO: Initialize to an appropriate value            target.ChangePermissions(path, mode);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for ChangeDirectory        ///</summary>        [TestMethod()]        public void ChangeDirectoryTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            target.ChangeDirectory(path);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for BeginUploadFile        ///</summary>        [TestMethod()]        public void BeginUploadFileTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            Stream input = null; // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value            object state = null; // TODO: Initialize to an appropriate value            Action<ulong> uploadCallback = null; // TODO: Initialize to an appropriate value            IAsyncResult expected = null; // TODO: Initialize to an appropriate value            IAsyncResult actual;            actual = target.BeginUploadFile(input, path, asyncCallback, state, uploadCallback);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for BeginUploadFile        ///</summary>        [TestMethod()]        public void BeginUploadFileTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            Stream input = null; // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            bool canOverride = false; // TODO: Initialize to an appropriate value            AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value            object state = null; // TODO: Initialize to an appropriate value            Action<ulong> uploadCallback = null; // TODO: Initialize to an appropriate value            IAsyncResult expected = null; // TODO: Initialize to an appropriate value            IAsyncResult actual;            actual = target.BeginUploadFile(input, path, canOverride, asyncCallback, state, uploadCallback);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for BeginSynchronizeDirectories        ///</summary>        [TestMethod()]        public void BeginSynchronizeDirectoriesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string sourcePath = string.Empty; // TODO: Initialize to an appropriate value            string destinationPath = string.Empty; // TODO: Initialize to an appropriate value            string searchPattern = string.Empty; // TODO: Initialize to an appropriate value            AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value            object state = null; // TODO: Initialize to an appropriate value            IAsyncResult expected = null; // TODO: Initialize to an appropriate value            IAsyncResult actual;            actual = target.BeginSynchronizeDirectories(sourcePath, destinationPath, searchPattern, asyncCallback, state);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for BeginListDirectory        ///</summary>        [TestMethod()]        public void BeginListDirectoryTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value            object state = null; // TODO: Initialize to an appropriate value            Action<int> listCallback = null; // TODO: Initialize to an appropriate value            IAsyncResult expected = null; // TODO: Initialize to an appropriate value            IAsyncResult actual;            actual = target.BeginListDirectory(path, asyncCallback, state, listCallback);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for BeginDownloadFile        ///</summary>        [TestMethod()]        public void BeginDownloadFileTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            Stream output = null; // TODO: Initialize to an appropriate value            AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value            object state = null; // TODO: Initialize to an appropriate value            Action<ulong> downloadCallback = null; // TODO: Initialize to an appropriate value            IAsyncResult expected = null; // TODO: Initialize to an appropriate value            IAsyncResult actual;            actual = target.BeginDownloadFile(path, output, asyncCallback, state, downloadCallback);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for AppendText        ///</summary>        [TestMethod()]        public void AppendTextTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            StreamWriter expected = null; // TODO: Initialize to an appropriate value            StreamWriter actual;            actual = target.AppendText(path, encoding);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for AppendText        ///</summary>        [TestMethod()]        public void AppendTextTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            StreamWriter expected = null; // TODO: Initialize to an appropriate value            StreamWriter actual;            actual = target.AppendText(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for AppendAllText        ///</summary>        [TestMethod()]        public void AppendAllTextTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            string contents = string.Empty; // TODO: Initialize to an appropriate value            target.AppendAllText(path, contents);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for AppendAllText        ///</summary>        [TestMethod()]        public void AppendAllTextTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            string contents = string.Empty; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            target.AppendAllText(path, contents, encoding);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for AppendAllLines        ///</summary>        [TestMethod()]        public void AppendAllLinesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            IEnumerable<string> contents = null; // TODO: Initialize to an appropriate value            target.AppendAllLines(path, contents);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for AppendAllLines        ///</summary>        [TestMethod()]        public void AppendAllLinesTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            IEnumerable<string> contents = null; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            target.AppendAllLines(path, contents, encoding);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for CreateText        ///</summary>        [TestMethod()]        public void CreateTextTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            StreamWriter expected = null; // TODO: Initialize to an appropriate value            StreamWriter actual;            actual = target.CreateText(path, encoding);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for CreateText        ///</summary>        [TestMethod()]        public void CreateTextTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            StreamWriter expected = null; // TODO: Initialize to an appropriate value            StreamWriter actual;            actual = target.CreateText(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for CreateDirectory        ///</summary>        [TestMethod()]        public void CreateDirectoryTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            target.CreateDirectory(path);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for Create        ///</summary>        [TestMethod()]        public void CreateTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            int bufferSize = 0; // TODO: Initialize to an appropriate value            SftpFileStream expected = null; // TODO: Initialize to an appropriate value            SftpFileStream actual;            actual = target.Create(path, bufferSize);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for Create        ///</summary>        [TestMethod()]        public void CreateTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            SftpFileStream expected = null; // TODO: Initialize to an appropriate value            SftpFileStream actual;            actual = target.Create(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for EndSynchronizeDirectories        ///</summary>        [TestMethod()]        public void EndSynchronizeDirectoriesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            IAsyncResult asyncResult = null; // TODO: Initialize to an appropriate value            IEnumerable<FileInfo> expected = null; // TODO: Initialize to an appropriate value            IEnumerable<FileInfo> actual;            actual = target.EndSynchronizeDirectories(asyncResult);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for EndListDirectory        ///</summary>        [TestMethod()]        public void EndListDirectoryTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            IAsyncResult asyncResult = null; // TODO: Initialize to an appropriate value            IEnumerable<SftpFile> expected = null; // TODO: Initialize to an appropriate value            IEnumerable<SftpFile> actual;            actual = target.EndListDirectory(asyncResult);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for EndDownloadFile        ///</summary>        [TestMethod()]        public void EndDownloadFileTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            IAsyncResult asyncResult = null; // TODO: Initialize to an appropriate value            target.EndDownloadFile(asyncResult);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for DownloadFile        ///</summary>        [TestMethod()]        public void DownloadFileTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            Stream output = null; // TODO: Initialize to an appropriate value            Action<ulong> downloadCallback = null; // TODO: Initialize to an appropriate value            target.DownloadFile(path, output, downloadCallback);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for DeleteFile        ///</summary>        [TestMethod()]        public void DeleteFileTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            target.DeleteFile(path);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for DeleteDirectory        ///</summary>        [TestMethod()]        public void DeleteDirectoryTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            target.DeleteDirectory(path);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for Delete        ///</summary>        [TestMethod()]        public void DeleteTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            target.Delete(path);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for GetLastAccessTimeUtc        ///</summary>        [TestMethod()]        public void GetLastAccessTimeUtcTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value            DateTime actual;            actual = target.GetLastAccessTimeUtc(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for GetLastAccessTime        ///</summary>        [TestMethod()]        public void GetLastAccessTimeTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value            DateTime actual;            actual = target.GetLastAccessTime(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for GetAttributes        ///</summary>        [TestMethod()]        public void GetAttributesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            SftpFileAttributes expected = null; // TODO: Initialize to an appropriate value            SftpFileAttributes actual;            actual = target.GetAttributes(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for Get        ///</summary>        [TestMethod()]        public void GetTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            SftpFile expected = null; // TODO: Initialize to an appropriate value            SftpFile actual;            actual = target.Get(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for Exists        ///</summary>        [TestMethod()]        public void ExistsTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            bool expected = false; // TODO: Initialize to an appropriate value            bool actual;            actual = target.Exists(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for EndUploadFile        ///</summary>        [TestMethod()]        public void EndUploadFileTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            IAsyncResult asyncResult = null; // TODO: Initialize to an appropriate value            target.EndUploadFile(asyncResult);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for GetLastWriteTimeUtc        ///</summary>        [TestMethod()]        public void GetLastWriteTimeUtcTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value            DateTime actual;            actual = target.GetLastWriteTimeUtc(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for GetLastWriteTime        ///</summary>        [TestMethod()]        public void GetLastWriteTimeTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value            DateTime actual;            actual = target.GetLastWriteTime(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for GetStatus        ///</summary>        [TestMethod()]        public void GetStatusTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            SftpFileSytemInformation expected = null; // TODO: Initialize to an appropriate value            SftpFileSytemInformation actual;            actual = target.GetStatus(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for ListDirectory        ///</summary>        [TestMethod()]        public void ListDirectoryTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            Action<int> listCallback = null; // TODO: Initialize to an appropriate value            IEnumerable<SftpFile> expected = null; // TODO: Initialize to an appropriate value            IEnumerable<SftpFile> actual;            actual = target.ListDirectory(path, listCallback);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for Open        ///</summary>        [TestMethod()]        public void OpenTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            FileMode mode = new FileMode(); // TODO: Initialize to an appropriate value            SftpFileStream expected = null; // TODO: Initialize to an appropriate value            SftpFileStream actual;            actual = target.Open(path, mode);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for Open        ///</summary>        [TestMethod()]        public void OpenTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            FileMode mode = new FileMode(); // TODO: Initialize to an appropriate value            FileAccess access = new FileAccess(); // TODO: Initialize to an appropriate value            SftpFileStream expected = null; // TODO: Initialize to an appropriate value            SftpFileStream actual;            actual = target.Open(path, mode, access);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for OpenRead        ///</summary>        [TestMethod()]        public void OpenReadTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            SftpFileStream expected = null; // TODO: Initialize to an appropriate value            SftpFileStream actual;            actual = target.OpenRead(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for OpenText        ///</summary>        [TestMethod()]        public void OpenTextTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            StreamReader expected = null; // TODO: Initialize to an appropriate value            StreamReader actual;            actual = target.OpenText(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for OpenWrite        ///</summary>        [TestMethod()]        public void OpenWriteTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            SftpFileStream expected = null; // TODO: Initialize to an appropriate value            SftpFileStream actual;            actual = target.OpenWrite(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for ReadAllBytes        ///</summary>        [TestMethod()]        public void ReadAllBytesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            byte[] expected = null; // TODO: Initialize to an appropriate value            byte[] actual;            actual = target.ReadAllBytes(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for ReadAllLines        ///</summary>        [TestMethod()]        public void ReadAllLinesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            string[] expected = null; // TODO: Initialize to an appropriate value            string[] actual;            actual = target.ReadAllLines(path, encoding);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for ReadAllLines        ///</summary>        [TestMethod()]        public void ReadAllLinesTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            string[] expected = null; // TODO: Initialize to an appropriate value            string[] actual;            actual = target.ReadAllLines(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for ReadAllText        ///</summary>        [TestMethod()]        public void ReadAllTextTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            string expected = string.Empty; // TODO: Initialize to an appropriate value            string actual;            actual = target.ReadAllText(path, encoding);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for ReadAllText        ///</summary>        [TestMethod()]        public void ReadAllTextTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            string expected = string.Empty; // TODO: Initialize to an appropriate value            string actual;            actual = target.ReadAllText(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for ReadLines        ///</summary>        [TestMethod()]        public void ReadLinesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            IEnumerable<string> expected = null; // TODO: Initialize to an appropriate value            IEnumerable<string> actual;            actual = target.ReadLines(path);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for ReadLines        ///</summary>        [TestMethod()]        public void ReadLinesTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            IEnumerable<string> expected = null; // TODO: Initialize to an appropriate value            IEnumerable<string> actual;            actual = target.ReadLines(path, encoding);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for RenameFile        ///</summary>        [TestMethod()]        public void RenameFileTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string oldPath = string.Empty; // TODO: Initialize to an appropriate value            string newPath = string.Empty; // TODO: Initialize to an appropriate value            target.RenameFile(oldPath, newPath);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for RenameFile        ///</summary>        [TestMethod()]        public void RenameFileTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string oldPath = string.Empty; // TODO: Initialize to an appropriate value            string newPath = string.Empty; // TODO: Initialize to an appropriate value            bool isPosix = false; // TODO: Initialize to an appropriate value            target.RenameFile(oldPath, newPath, isPosix);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for SetAttributes        ///</summary>        [TestMethod()]        public void SetAttributesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            SftpFileAttributes fileAttributes = null; // TODO: Initialize to an appropriate value            target.SetAttributes(path, fileAttributes);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for SetLastAccessTime        ///</summary>        [TestMethod()]        public void SetLastAccessTimeTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            DateTime lastAccessTime = new DateTime(); // TODO: Initialize to an appropriate value            target.SetLastAccessTime(path, lastAccessTime);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for SetLastAccessTimeUtc        ///</summary>        [TestMethod()]        public void SetLastAccessTimeUtcTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            DateTime lastAccessTimeUtc = new DateTime(); // TODO: Initialize to an appropriate value            target.SetLastAccessTimeUtc(path, lastAccessTimeUtc);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for SetLastWriteTime        ///</summary>        [TestMethod()]        public void SetLastWriteTimeTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            DateTime lastWriteTime = new DateTime(); // TODO: Initialize to an appropriate value            target.SetLastWriteTime(path, lastWriteTime);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for SetLastWriteTimeUtc        ///</summary>        [TestMethod()]        public void SetLastWriteTimeUtcTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            DateTime lastWriteTimeUtc = new DateTime(); // TODO: Initialize to an appropriate value            target.SetLastWriteTimeUtc(path, lastWriteTimeUtc);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for SymbolicLink        ///</summary>        [TestMethod()]        public void SymbolicLinkTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            string linkPath = string.Empty; // TODO: Initialize to an appropriate value            target.SymbolicLink(path, linkPath);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for SynchronizeDirectories        ///</summary>        [TestMethod()]        public void SynchronizeDirectoriesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string sourcePath = string.Empty; // TODO: Initialize to an appropriate value            string destinationPath = string.Empty; // TODO: Initialize to an appropriate value            string searchPattern = string.Empty; // TODO: Initialize to an appropriate value            IEnumerable<FileInfo> expected = null; // TODO: Initialize to an appropriate value            IEnumerable<FileInfo> actual;            actual = target.SynchronizeDirectories(sourcePath, destinationPath, searchPattern);            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for UploadFile        ///</summary>        [TestMethod()]        public void UploadFileTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            Stream input = null; // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            Action<ulong> uploadCallback = null; // TODO: Initialize to an appropriate value            target.UploadFile(input, path, uploadCallback);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for UploadFile        ///</summary>        [TestMethod()]        public void UploadFileTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            Stream input = null; // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            bool canOverride = false; // TODO: Initialize to an appropriate value            Action<ulong> uploadCallback = null; // TODO: Initialize to an appropriate value            target.UploadFile(input, path, canOverride, uploadCallback);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for WriteAllBytes        ///</summary>        [TestMethod()]        public void WriteAllBytesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            byte[] bytes = null; // TODO: Initialize to an appropriate value            target.WriteAllBytes(path, bytes);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for WriteAllLines        ///</summary>        [TestMethod()]        public void WriteAllLinesTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            IEnumerable<string> contents = null; // TODO: Initialize to an appropriate value            target.WriteAllLines(path, contents);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for WriteAllLines        ///</summary>        [TestMethod()]        public void WriteAllLinesTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            string[] contents = null; // TODO: Initialize to an appropriate value            target.WriteAllLines(path, contents);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for WriteAllLines        ///</summary>        [TestMethod()]        public void WriteAllLinesTest2()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            IEnumerable<string> contents = null; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            target.WriteAllLines(path, contents, encoding);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for WriteAllLines        ///</summary>        [TestMethod()]        public void WriteAllLinesTest3()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            string[] contents = null; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            target.WriteAllLines(path, contents, encoding);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for WriteAllText        ///</summary>        [TestMethod()]        public void WriteAllTextTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            string contents = string.Empty; // TODO: Initialize to an appropriate value            target.WriteAllText(path, contents);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for WriteAllText        ///</summary>        [TestMethod()]        public void WriteAllTextTest1()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string path = string.Empty; // TODO: Initialize to an appropriate value            string contents = string.Empty; // TODO: Initialize to an appropriate value            Encoding encoding = null; // TODO: Initialize to an appropriate value            target.WriteAllText(path, contents, encoding);            Assert.Inconclusive("A method that does not return a value cannot be verified.");        }        /// <summary>        ///A test for BufferSize        ///</summary>        [TestMethod()]        public void BufferSizeTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            uint expected = 0; // TODO: Initialize to an appropriate value            uint actual;            target.BufferSize = expected;            actual = target.BufferSize;            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for OperationTimeout        ///</summary>        [TestMethod()]        public void OperationTimeoutTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            TimeSpan expected = new TimeSpan(); // TODO: Initialize to an appropriate value            TimeSpan actual;            target.OperationTimeout = expected;            actual = target.OperationTimeout;            Assert.AreEqual(expected, actual);            Assert.Inconclusive("Verify the correctness of this test method.");        }        /// <summary>        ///A test for WorkingDirectory        ///</summary>        [TestMethod()]        public void WorkingDirectoryTest()        {            ConnectionInfo connectionInfo = null; // TODO: Initialize to an appropriate value            SftpClient target = new SftpClient(connectionInfo); // TODO: Initialize to an appropriate value            string actual;            actual = target.WorkingDirectory;            Assert.Inconclusive("Verify the correctness of this test method.");        }        protected override void OnInit()        {            base.OnInit();            using (var client = new SshClient(Resources.HOST, Resources.USERNAME, Resources.PASSWORD))            {                client.Connect();                client.RunCommand("rm -rf *");                client.Disconnect();            }        }        protected static string CalculateMD5(string fileName)        {            using (FileStream file = new FileStream(fileName, FileMode.Open))            {                MD5 md5 = new MD5CryptoServiceProvider();                byte[] retVal = md5.ComputeHash(file);                file.Close();                StringBuilder sb = new StringBuilder();                for (int i = 0; i < retVal.Length; i++)                {                    sb.Append(retVal[i].ToString("x2"));                }                return sb.ToString();            }        }        /// <summary>        /// Helper class to help with upload and download testing        /// </summary>        private class TestInfo        {            public string RemoteFileName { get; set; }            public string UploadedFileName { get; set; }            public string DownloadedFileName { get; set; }            //public ulong UploadedBytes { get; set; }            //public ulong DownloadedBytes { get; set; }            public FileStream UploadedFile { get; set; }            public FileStream DownloadedFile { get; set; }            public string UploadedHash { get; set; }            public string DownloadedHash { get; set; }            public SftpUploadAsyncResult UploadResult { get; set; }            public SftpDownloadAsyncResult DownloadResult { get; set; }        }    }}
 |