Example #1
0
        public void WriteTest(Plan p)
        {
            string className = this.testPrefix + p.TestCaseId;
            string fileName  = outputDir + "\\" + "temp" + "\\" + className + ".cs";

            TestWriterHelperMethods.WritePlanToFile(p, fileName, null, className);
        }
Example #2
0
        public void WriteTest(Plan plan)
        {
            string className = plan.ClassName + plan.TestCaseId;
            string fileName  = outputDir + "\\" + className + ".cs";

            TestWriterHelperMethods.WritePlanToFile(plan, fileName, null, className, useRandoopContracts);
        }
Example #3
0
        public void WriteTest(Plan p)
        {
            string testClassName = p.ClassName + p.TestCaseId;
            string fileName      = outputDir + "\\" + "temp" + "\\" + testClassName + ".cs";

            TestWriterHelperMethods.WritePlanToFile(p, fileName, null, testClassName, useRandoopContracts);
        }
Example #4
0
        public void MoveNormalTermination(Plan p)
        {
            var    correspondingDirectory = DirectoryAlreadyExists(p.ClassName) ? classDirectories.Single(_ => _.Name == p.ClassName) : CreateNewDirectory(p.ClassName);
            string testClassName          = p.ClassName + p.TestCaseId;
            string oldTestFileName        = outputDir + "\\" + "temp" + "\\" + testClassName + ".cs";
            string newTestFileName        = correspondingDirectory + "\\" + testClassName + ".cs";

            TestWriterHelperMethods.WritePlanToFile(p, newTestFileName, null, testClassName, useRandoopContracts);
            new FileInfo(oldTestFileName).Delete();
        }
Example #5
0
        public void Move(Plan p, Exception exceptionThrown)
        {
            string className = p.ClassName + p.TestCaseId;
            string fileName  = outputDir + "\\" + className + ".cs";

            string savedFileName = fileName + ".saved";

            File.Copy(fileName, savedFileName);
            new FileInfo(fileName).Delete();
            TestWriterHelperMethods.WritePlanToFile(p, fileName, exceptionThrown.GetType(), className, useRandoopContracts);
            new FileInfo(savedFileName).Delete();
        }
Example #6
0
        public void Move(Plan p, Exception exceptionThrown)
        {
            string dirName;

            MakeExceptionDirIfNotExists(exceptionThrown, out dirName);
            string testClassName   = p.ClassName + p.TestCaseId;
            string oldTestFileName = outputDir + "\\" + "temp" + "\\" + testClassName + ".cs";
            string newTestFileName = dirName + "\\" + testClassName + ".cs";

            TestWriterHelperMethods.WritePlanToFile(p, newTestFileName, exceptionThrown.GetType(), testClassName, useRandoopContracts);
            new FileInfo(oldTestFileName).Delete();
        }
Example #7
0
        public void Move(Plan p, Exception exceptionThrown)
        {
            string dirName;

            MakeExceptionDirIfNotExists(exceptionThrown, out dirName);
            string className       = this.testPrefix + p.TestCaseId;
            string oldTestFileName = outputDir + "\\" + "temp" + "\\" + className + ".cs";
            string newTestFileName = dirName + "\\" + className + ".cs";

            TestWriterHelperMethods.WritePlanToFile(p, newTestFileName, exceptionThrown.GetType(), className);
            new FileInfo(oldTestFileName).Delete();
        }
Example #8
0
        public void MoveNormalTermination(Plan p)
        {
            if (numNormalTerminationPlansWritten % 1000 == 0)
            {
                newSubDir();
            }

            string testClassName   = p.ClassName + p.TestCaseId;
            string oldTestFileName = outputDir + "\\" + "temp" + "\\" + testClassName + ".cs";
            string newTestFileName = normalTerminationCurrentDir + "\\" + testClassName + ".cs";

            TestWriterHelperMethods.WritePlanToFile(p, newTestFileName, null, testClassName, useRandoopContracts);
            new FileInfo(oldTestFileName).Delete();
            numNormalTerminationPlansWritten++;
        }
Example #9
0
        public void MoveNormalTermination(Plan p)
        {
            if (numNormalTerminationPlansWritten % 1000 == 0)
            {
                newSubDir();
            }

            string className       = this.testPrefix + p.TestCaseId;
            string oldTestFileName = outputDir + "\\" + "temp" + "\\" + className + ".cs";
            string newTestFileName = normalTerminationCurrentDir + "\\" + className + ".cs";

            TestWriterHelperMethods.WritePlanToFile(p, newTestFileName, null, className);
            new FileInfo(oldTestFileName).Delete();
            numNormalTerminationPlansWritten++;
        }