Example #1
0
        public void AddNewImportFile_NoReadPermissions()
        {
            string importPath = String.Empty;

            try
            {
                importPath = ObjectModelHelpers.CreateTempFileOnDisk(TestData.ContentSimpleTools35InitialTargets);
                Project p = new Project(new Engine());
                CompatibilityTestHelpers.SetFileAccessPermissions(importPath, FileSystemRights.Read, AccessControlType.Deny);
                InvokeAddNewImportMethod(p, importPath, null);
            }
            finally
            {
                CompatibilityTestHelpers.RemoveFile(importPath);
            }
        }