コード例 #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;
 }
コード例 #2
0
ファイル: ReportTest.cs プロジェクト: dougrathbone/mbunit-v3
        public void GetAndSetPackageConfig()
        {
            Report report = new Report();

            Assert.IsNull(report.TestModel);

            TestPackageData value = new TestPackageData();

            report.TestPackage = value;
            Assert.AreSame(value, report.TestPackage);
        }
コード例 #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;
        }
コード例 #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.
        }