ToString() публичный Метод

public ToString ( ) : string
Результат string
Пример #1
0
        public void Share_Constructor_Construct_ExpectValid()
        {
            //------------Setup for test--------------------------
            var share = new Share("a","b",ShareType.Disk);

            //------------Execute Test---------------------------

            //------------Assert Results-------------------------
            Assert.AreEqual(@"\\a\b",share.ToString());
        }
Пример #2
0
        public void Share_ToString_BlankServer_ExpectLocalName()
        {
            //------------Setup for test--------------------------
            var share = new Share("", "IPC$", ShareType.Special);


            //------------Execute Test---------------------------

            //------------Assert Results-------------------------
            Assert.AreEqual("\\\\"+Environment.MachineName+"\\IPC$", share.ToString());
        }