public void DeleteTest()
        {
            Uri          address     = TargetFileUri;
            ICredentials credentials = Credentials;

            WebDavUtility.Delete(address, credentials);
        }
        public void CreateTest()
        {
            Uri          address     = TargetFileUri;
            ICredentials credentials = Credentials;

            byte[] content = Encoding.UTF8.GetBytes("abcde");

            WebDavUtility.Create(address, content, credentials);
        }
        public void ReadTest()
        {
            Uri          address     = TargetFileUri;
            ICredentials credentials = Credentials;

            byte[] expected = Encoding.UTF8.GetBytes("abcde");

            byte[] actual = WebDavUtility.Read(address, credentials);
            CollectionAssert.AreEqual(expected, actual);
        }
        public void GetChildrenTest()
        {
            Uri          address     = TargetDirectoryUri;
            ICredentials credentials = Credentials;

            var actual = WebDavUtility.GetChildren(address, Credentials);

            actual.ForEachExecute(e => Console.WriteLine(e.Uri.GetName()));
            Assert.Inconclusive("出力結果を目視で確認してください。");
        }
        public void OpenUpdateTest()
        {
            Uri          address     = TargetFileUri;
            ICredentials credentials = Credentials;

            byte[] content = Encoding.UTF8.GetBytes("abcdefghij");

            using (var input = new MemoryStream(content))
                using (var output = WebDavUtility.OpenUpdate(address, credentials))
                {
                    input.CopyTo(output);
                }
        }
        public void OpenReadTest()
        {
            Uri          address     = TargetFileUri;
            ICredentials credentials = Credentials;

            byte[] expected = Encoding.UTF8.GetBytes("abcde");

            using (var input = WebDavUtility.OpenRead(address, credentials))
                using (var output = new MemoryStream())
                {
                    input.CopyTo(output);
                    byte[] actual = output.ToArray();

                    CollectionAssert.AreEqual(expected, actual);
                }
        }