Exemple #1
0
        public void CopyFromWithNullDest()
        {
            // Setup
            var pathTree = new PathTree <string>();
            var file     = new PathFile <string>(pathTree, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(a_source: null);
        }
Exemple #2
0
        public void CopyFromWithNotExistingSource()
        {
            // Setup
            var pathTree = new PathTree <string>();

            pathTree.CreateDirectory(@"x:\directory");
            var source = new PathFile <string>(pathTree, @"x:\directory\File.bmp");
            var file   = new PathFile <string>(pathTree, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(source);
        }
Exemple #3
0
        public void CopyFrom()
        {
            // Setup
            var pathTree = new PathTree <string>();
            var source   = pathTree.CreateFile(@"x:\directory\File.bmp", "Value");
            var file     = new PathFile <string>(pathTree, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(source);

            // Assert
            Assert.IsTrue(file.Exists);
            Assert.AreEqual("Value", file.Value);
        }
Exemple #4
0
        public void CopyFromWithNullDest()
        {
            // Setup
            var pathTree = new PathTree<string>();
            var file = new PathFile<string>(pathTree, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(a_source: null);
        }
Exemple #5
0
        public void CopyFromWithNotExistingSource()
        {
            // Setup
            var pathTree = new PathTree<string>();
            pathTree.CreateDirectory(@"x:\directory");
            var source = new PathFile<string>(pathTree, @"x:\directory\File.bmp");
            var file = new PathFile<string>(pathTree, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(source);
        }
Exemple #6
0
        public void CopyFrom()
        {
            // Setup
            var pathTree = new PathTree<string>();
            var source = pathTree.CreateFile(@"x:\directory\File.bmp", "Value");
            var file = new PathFile<string>(pathTree, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(source);

            // Assert
            Assert.IsTrue(file.Exists);
            Assert.AreEqual("Value", file.Value);
        }