Beispiel #1
0
        protected void SetUp()
        {
            var config = ITUtils.GetConfig();

            this.uuid = Guid.NewGuid();
            string localPath = Path.Combine(config[1].ToString(), Path.GetRandomFileName());

            this.localFolder = new DirectoryInfo(localPath);
            this.localFolder.Create();
            this.localSubFolder = new DirectoryInfo(Path.Combine(this.localFolder.FullName, Path.GetRandomFileName()));
            this.localSubFolder.Create();
            this.localFile = new FileInfo(Path.Combine(this.localFolder.FullName, Path.GetRandomFileName()));
            using (this.localFile.Create())
            {
            }

            if (AreExtendedAttributesAvailable(this.localFile.FullName))
            {
                new FileInfoWrapper(this.localFile).Uuid = this.uuid;
            }

            if (AreExtendedAttributesAvailable(this.localSubFolder.FullName))
            {
                new DirectoryInfoWrapper(this.localSubFolder).Uuid = this.uuid;
            }

            this.queue           = new Mock <ISyncEventQueue>();
            this.returnedFSEvent = null;
        }
 private static RepoInfo CreateRepoInfo()
 {
     return(new RepoInfo {
         Address = new Uri("http://example.com"),
         LocalPath = ITUtils.GetConfig()[1].ToString(),
         RemotePath = "/"
     });
 }
        public void ClassInit()
        {
            config = ITUtils.GetConfig();
#if __COCOA__
            try {
                MonoMac.AppKit.NSApplication.Init();
            } catch (InvalidOperationException) {
            }
#endif
        }
        public void SetUp()
        {
            var    config    = ITUtils.GetConfig();
            string localPath = config[1].ToString();

            this.path = Path.Combine(localPath, Path.GetRandomFileName());
            if (!this.fsFactory.CreateDirectoryInfo(localPath).IsExtendedAttributeAvailable())
            {
                Assert.Ignore("Extended Attribute not available on this machine");
            }
        }
Beispiel #5
0
        public void SetUp()
        {
            var    config    = ITUtils.GetConfig();
            string localPath = config[1].ToString();

            path = Path.Combine(localPath, Path.GetRandomFileName());
            var reader = new ExtendedAttributeReaderUnix();

            if (!reader.IsFeatureAvailable(localPath))
            {
                Assert.Ignore("Extended Attribute not available on this machine");
            }
        }
        public void SetUp()
        {
            var    config    = ITUtils.GetConfig();
            string localPath = config[1].ToString();

            this.testFolder = Path.Combine(localPath, Guid.NewGuid().ToString());
            this.longPath   = Path.GetFullPath(this.testFolder);
            string shortName = "1234567890";

            for (int i = 0; i < 30; i++)
            {
                this.longPath = Path.Combine(this.longPath, shortName);
            }

            var dir = Factory.CreateDirectoryInfo(this.longPath);

            Console.WriteLine(dir.FullName);
            dir.Create();
            this.longName = string.Empty;
            for (int i = 0; i < MaxFileNameLength; i++)
            {
                this.longName += "a";
            }
        }