public void WindowsNetworkFileShare_Constructor_ThrowsOn_ConnectFail()
        {
            var fakeMPR = new FakeMPR(false);

            var exception = Assert.Throws <ExternalException>(() => new WindowsNetworkFileShare("doesn't-matter", new NetworkCredential("user", "password"), fakeMPR));

            Assert.Equal("Error connecting to remote share - Code: 1200, Error: Bad Device", exception.Message);
        }
        public void WindowsNetworkFileShare_Constructor_ConcatsUserAndDomain()
        {
            var fakeMPR = new FakeMPR();

            _ = new WindowsNetworkFileShare(@"\\server\path", new NetworkCredential("user", "password", "domain"), fakeMPR);

            Assert.Equal(@"domain\user", fakeMPR._username);
            Assert.Equal("password", fakeMPR._password);
            Assert.Equal(@"\\server\path", fakeMPR._networkpath);
        }
        public void WindowsNetworkFileShare_Constructor_SetsValuesOn_ConnectSuccess()
        {
            var fakeMPR = new FakeMPR();

            _ = new WindowsNetworkFileShare(@"\\server\path", new NetworkCredential("user", "password"), fakeMPR);

            Assert.Equal("user", fakeMPR._username);
            Assert.Equal("password", fakeMPR._password);
            Assert.Equal(@"\\server\path", fakeMPR._networkpath);
        }