Exemplo n.º 1
0
		public void ActualFilePath_ComposedFilenameExists()
		{
			MockFileOS fileOs = new MockFileOS();
			fileOs.m_existingFiles.Add("\u00e9");
			ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", fileOs);
			Assert.AreEqual("\u00e9", FileUtils.ActualFilePath("\u0065\u0301")); // accented e
		}
Exemplo n.º 2
0
		public void ActualFilePath_FileDoesNotExist()
		{
			MockFileOS fileOs = new MockFileOS();
			fileOs.m_existingFiles.Add("flurp");
			ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", fileOs);
			Assert.AreEqual("boo", FileUtils.ActualFilePath("boo"));
		}
Exemplo n.º 3
0
        public void ActualFilePath_DecomposedFilenameExists()
        {
            MockFileOS fileOs = new MockFileOS();

            fileOs.m_existingFiles.Add("\u0065\u0301");
            ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", fileOs);
            Assert.AreEqual("\u0065\u0301", FileUtils.ActualFilePath("\u00e9"));             // accented e
        }
Exemplo n.º 4
0
        public void ActualFilePath_FileDoesNotExist()
        {
            MockFileOS fileOs = new MockFileOS();

            fileOs.m_existingFiles.Add("flurp");
            ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", fileOs);
            Assert.AreEqual("boo", FileUtils.ActualFilePath("boo"));
        }
Exemplo n.º 5
0
        public void ActualFilePath_DirectoryNameDecomposedFilenameExistsWithDifferentCase()
        {
            MockFileOS fileOs = new MockFileOS();

            fileOs.m_existingFiles.Add("AbC");
            fileOs.m_existingDirectories.Add("c:\\My Docum\u0065\u0301nts");
            ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", fileOs);
            Assert.AreEqual("c:\\My Docum\u0065\u0301nts\\AbC", FileUtils.ActualFilePath("c:\\My Docum\u00e9nts\\abc"));
        }
Exemplo n.º 6
0
        public void ActualFilePath_DirectoryNameExactMatchFilenameExistsWithDifferentCase()
        {
            MockFileOS fileOs = new MockFileOS();

            fileOs.m_existingFiles.Add("AbC");
            fileOs.m_existingDirectories.Add(@"c:\My Documents");
            ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", fileOs);
            Assert.AreEqual(@"c:\My Documents\AbC", FileUtils.ActualFilePath(@"c:\My Documents\abc"));
        }
Exemplo n.º 7
0
		public void ActualFilePath_DirectoryNameDecomposedFilenameExistsWithDifferentCase()
		{
			MockFileOS fileOs = new MockFileOS();
			fileOs.m_existingFiles.Add("AbC");
			fileOs.m_existingDirectories.Add("c:\\My Docum\u0065\u0301nts");
			ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", fileOs);
			Assert.AreEqual("c:\\My Docum\u0065\u0301nts\\AbC", FileUtils.ActualFilePath("c:\\My Docum\u00e9nts\\abc"));
		}
Exemplo n.º 8
0
		public void ActualFilePath_DirectoryNameExactMatchFilenameExistsWithDifferentCase()
		{
			MockFileOS fileOs = new MockFileOS();
			fileOs.m_existingFiles.Add("AbC");
			fileOs.m_existingDirectories.Add(@"c:\My Documents");
			ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", fileOs);
			Assert.AreEqual(@"c:\My Documents\AbC", FileUtils.ActualFilePath(@"c:\My Documents\abc"));
		}