Information about a local share
Exemplo n.º 1
0
        public void Share_IsFileSystem_ExpectValid()
        {
            //------------Setup for test--------------------------
            var share = new Share("a", "b", ShareType.Disk);

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

            //------------Assert Results-------------------------
            Assert.IsTrue(share.IsFileSystem);
        }
Exemplo n.º 2
0
        public void Share_IsFileSystem_DeviveType_ExpectFalse()
        {
            //------------Setup for test--------------------------
            var share = new Share("a", "b", ShareType.Device);

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

            //------------Assert Results-------------------------
            Assert.IsFalse(share.IsFileSystem);
        }
Exemplo n.º 3
0
        public void Share_Constructor_IPC_ExpectCorrectType()
        {
            //------------Setup for test--------------------------
            var share = new Share("a", "IPC$", ShareType.Special);

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

            //------------Assert Results-------------------------
            Assert.AreEqual(ShareType.Special|ShareType.IPC, share.ShareType);
        }
Exemplo n.º 4
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());
        }
Exemplo n.º 5
0
        public void Share_IsFileSystem_Special_ExpectFalse()
        {
            //------------Setup for test--------------------------
            var share = new Share("a", "b", ShareType.Special);


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

            //------------Assert Results-------------------------
            Assert.IsTrue(share.IsFileSystem);
        }
Exemplo n.º 6
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());
        }