Exemplo n.º 1
0
        private static IEnumerable <ITestCaseData> LoadTestCases()
        {
            var currentFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            var projectDir = GetLessJsArchiveDirectory(currentFolder);

            var differencesDir = ConfigurationManager.AppSettings["differencesDirectory"];
            var ignoreFile     = ConfigurationManager.AppSettings["ignoreFile"];

            if (!Path.IsPathRooted(projectDir))
            {
                projectDir = Path.GetFullPath(projectDir);
            }

            if (!Path.IsPathRooted(ignoreFile))
            {
                ignoreFile = Path.Combine(currentFolder, ignoreFile);
            }

            if (!Path.IsPathRooted(differencesDir))
            {
                differencesDir = Path.Combine(currentFolder, differencesDir);
            }

            var testPaths = TestPath.LoadAll(projectDir, differencesDir);
            var ignores   = Ignore.Load(ignoreFile);

            return(testPaths.Select(t => CreateTestCase(t, ignores)));
        }
Exemplo n.º 2
0
        private IEnumerable <ITestCaseData> LoadTestCases()
        {
            var projectDir     = ConfigurationManager.AppSettings["lessJsProjectDirectory"];
            var differencesDir = ConfigurationManager.AppSettings["differencesDirectory"];
            var ignoreFile     = ConfigurationManager.AppSettings["ignoreFile"];

            var testPaths = TestPath.LoadAll(projectDir, differencesDir);
            var ignores   = Ignore.Load(ignoreFile);

            return(testPaths.Select(t => CreateTestCase(t, ignores)));
        }