Exemplo n.º 1
0
        public void CopyFromWithNullDest()
        {
            // Setup
            var fileSystem = new TestFileSystem();
            var file       = new TestFile(fileSystem, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(a_source: null);
        }
Exemplo n.º 2
0
        public void CopyFromWithNotExistingSource()
        {
            // Setup
            var fileSystem = new TestFileSystem();

            fileSystem.StageDirectory(@"x:\directory");
            var source = new TestFile(fileSystem, @"x:\directory\File.bmp");
            var file   = new TestFile(fileSystem, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(source);
        }
Exemplo n.º 3
0
        public void CopyFrom()
        {
            // Setup
            var fileSystem = new TestFileSystem();
            var source     = fileSystem.StageFile(@"x:\directory\File.bmp", new TestFileInstance {
                Size = 240
            });
            var file = new TestFile(fileSystem, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(source);

            // Assert
            Assert.IsTrue(file.Exists);
            Assert.AreEqual(240, file.Size);
        }
Exemplo n.º 4
0
        public void CopyFromWithNullDest()
        {
            // Setup
            var fileSystem = new TestFileSystem();
            var file = new TestFile(fileSystem, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(a_source: null);
        }
Exemplo n.º 5
0
        public void CopyFromWithNotExistingSource()
        {
            // Setup
            var fileSystem = new TestFileSystem();
            fileSystem.StageDirectory(@"x:\directory");
            var source = new TestFile(fileSystem, @"x:\directory\File.bmp");
            var file = new TestFile(fileSystem, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(source);
        }
Exemplo n.º 6
0
        public void CopyFrom()
        {
            // Setup
            var fileSystem = new TestFileSystem();
            var source = fileSystem.StageFile(@"x:\directory\File.bmp", new TestFileInstance { Size = 240 });
            var file = new TestFile(fileSystem, @"x:\directory\file2.bmp");

            // Execute
            file.CopyFrom(source);

            // Assert
            Assert.IsTrue(file.Exists);
            Assert.AreEqual(240, file.Size);
        }