Exemple #1
0
        public void testComponentPickups()
        {
            string          problemDescription = "C:\\Dropbox\\skola\\Exjobb\\testparameters\\problemdescription";
            CellDescription cellDataChange     = null;

            for (int i = 1; i <= 6; i++)
            {
                string testFile = problemDescription + i;
                cellDataChange = new FileInputData(new InputData(testFile)).FetchData();
                for (int j = 0; j < 15; j++)
                {
                    ConstraintProblem csp = new ConstraintProblem(cellDataChange, inputParams);
                    csp.Solve();
                }
            }
        }
        public void GetInputDataTest_CanLocateTxtFiles()
        {
            var currentTestDirectory   = TestContext.CurrentContext.TestDirectory;
            var testFilesDirectoryPath = Path.Combine(
                currentTestDirectory,
                TestsDirectoryName,
                ArgumentParserDirectoryName,
                TestFilesDirectoryName);

            var fileInputData = new FileInputData(testFilesDirectoryPath);

            var filePaths = fileInputData.GetInputData.ToList();

            Assert.That(
                filePaths.Count(),
                Is.EqualTo(2),
                () => $"Found {filePaths.Count} files at {testFilesDirectoryPath}");
            Assert.That(filePaths.All(path => path.EndsWith(".txt")));
        }