Ejemplo n.º 1
0
 /// <summary>
 /// Creates an empty test project.
 /// </summary>
 public TestProjectData()
 {
     testPackage = new TestPackageData();
     testFilters = new List<FilterInfo>();
     testRunnerExtensions = new List<string>();
     reportNameFormat = TestProject.DefaultReportNameFormat;
     reportDirectory = TestProject.DefaultReportDirectoryRelativePath;
 }
Ejemplo n.º 2
0
        public void GetAndSetPackageConfig()
        {
            Report report = new Report();

            Assert.IsNull(report.TestModel);

            TestPackageData value = new TestPackageData();

            report.TestPackage = value;
            Assert.AreSame(value, report.TestPackage);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Copies the contents of a test project.
        /// </summary>
        /// <param name="source">The source test project.</param>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="source"/> is null.</exception>
        public TestProjectData(TestProject source)
            : this()
        {
            if (source == null)
                throw new ArgumentNullException("source");

            testPackage = new TestPackageData(source.TestPackage);
            GenericCollectionUtils.ConvertAndAddAll(source.TestFilters, testFilters, x => x.Copy());
            testRunnerExtensions.AddRange(source.TestRunnerExtensionSpecifications);
            reportNameFormat = source.ReportNameFormat;
            reportDirectory = source.ReportDirectory;
        }
Ejemplo n.º 4
0
        public static void AreEqual(TestPackageData expected, TestPackageData actual)
        {
            if (expected == null)
            {
                Assert.IsNull(actual);
                return;
            }

            Assert.AreElementsEqual(expected.Files, actual.Files);
            Assert.AreElementsEqual(expected.HintDirectories, actual.HintDirectories);

            // TODO: Compare HostSetup objects.
        }