Exemple #1
0
        public void Test_MultipleAddenda()
        {
            Report report = CreateReport();

            report.ActivePart.Complete();

            ReportPart addendum1 = report.AddAddendum();

            addendum1.Complete();

            Assert.AreEqual(ReportStatus.C, report.Status);             // report is Corrected
            Assert.IsNotNull(report.CorrectedTime);
            Assert.AreEqual(2, report.Parts.Count);
            Assert.AreEqual(ReportPartStatus.F, report.Parts[0].Status);
            Assert.AreEqual(ReportPartStatus.F, report.Parts[1].Status);

            DateTime?correctedTime = report.CorrectedTime;

            ReportPart addendum2 = report.AddAddendum();

            addendum2.Complete();

            // check basics
            Assert.AreEqual(ReportStatus.C, report.Status);             // report is Corrected
            Assert.AreEqual(correctedTime, report.CorrectedTime);       // corrected time was not affected by the additonal addendum
            Assert.AreEqual(3, report.Parts.Count);
            Assert.AreEqual(ReportPartStatus.F, report.Parts[0].Status);
            Assert.AreEqual(ReportPartStatus.F, report.Parts[1].Status);
            Assert.AreEqual(ReportPartStatus.F, report.Parts[2].Status);
        }
Exemple #2
0
        public void Test_AddendumDraftToComplete()
        {
            Report report = CreateReport();

            report.ActivePart.Complete();

            ReportPart addendum = report.AddAddendum();

            addendum.Complete();

            // check basics
            Assert.AreEqual(ReportStatus.C, report.Status);             // report is Corrected
            Assert.IsNotNull(report.CorrectedTime);
            Assert.AreEqual(2, report.Parts.Count);
            Assert.AreEqual(ReportPartStatus.F, report.Parts[0].Status);
            Assert.AreEqual(ReportPartStatus.F, report.Parts[1].Status);
        }