コード例 #1
0
        public void CreateOutputDirectoryTest()
        {
            var outputdir = FetAlgorithm.CreateOutputDirectory("test");

            Assert.IsTrue(Directory.Exists(outputdir));
            Directory.Delete(outputdir);
        }
コード例 #2
0
        public void IntegrationTest()
        {
            var algo  = new FetAlgorithm();
            var model = new TestDataModel().MockDataModel;
            var task  = algo.GenerateTask("testIdentifier", model.Object, CancellationToken.None);

            task.Wait();
            Assert.IsInstanceOf <Timetable>(task.Result);
        }
コード例 #3
0
        public void CreateProcessTest()
        {
            var path     = FetAlgorithm.CreateOutputDirectory("test");
            var filepath = Path.Combine(path, "test.fet");

            using (File.Create(filepath))
            {
                var algo = new FetAlgorithm
                {
                    InputFile = filepath,
                    OutputDir = path
                };

                var proc = algo.CreateProcess();
                Assert.IsNotNull(proc);
            }

            File.Delete(filepath);
            Directory.Delete(path);
        }