Example #1
0
        protected override void CustomSetUp()
        {
            base.CustomSetUp();

            if (!string.IsNullOrEmpty(SyncTestHelpers.ProfessionalFeatureToken))
            {
                SyncConfiguration.SetFeatureToken(SyncTestHelpers.ProfessionalFeatureToken);
            }

            var defaultFolder = InteropConfig.DefaultStorageFolder;

            if (TestHelpers.IsWindows)
            {
                // We do this to reduce the length of the folders in Windows
                var testsIndex = defaultFolder.IndexOf("\\Tests\\");
                var docsIndex  = defaultFolder.IndexOf("\\Documents") + 1;

                if (testsIndex > -1 && docsIndex > testsIndex)
                {
                    defaultFolder = Path.Combine(defaultFolder.Substring(0, testsIndex), defaultFolder.Substring(docsIndex))
                                    .Replace("\\Documents", "\\D");

                    Directory.CreateDirectory(defaultFolder);
                }
            }

            SharedRealmHandleExtensions.ConfigureFileSystem(persistence, null, false, defaultFolder);
        }
Example #2
0
        protected override void CustomSetUp()
        {
            base.CustomSetUp();

            if (!string.IsNullOrEmpty(SyncTestHelpers.ProfessionalFeatureToken))
            {
                SyncConfiguration.SetFeatureToken(SyncTestHelpers.ProfessionalFeatureToken);
            }

            SharedRealmHandleExtensions.ConfigureFileSystem(persistence, null, false);
        }