Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public void Test_AddAddendumToCancelled()
        {
            Report report = CreateReport();

            report.ActivePart.Cancel();
            report.AddAddendum();
        }
Exemplo n.º 3
0
        public void Test_AddAddendumToPreliminary()
        {
            Report report = CreateReport();

            report.ActivePart.MarkPreliminary();
            report.AddAddendum();
        }
Exemplo n.º 4
0
        public void Test_AddAddendumToFinal()
        {
            Report report = CreateReport();

            report.ActivePart.Complete();

            report.AddAddendum();

            // check basics
            Assert.AreEqual(ReportStatus.F, report.Status);                     // report is still considered Final (not Corrected until addendum is complete)
            Assert.AreEqual(2, report.Parts.Count);
            Assert.AreEqual(ReportPartStatus.F, report.Parts[0].Status);
            Assert.AreEqual(ReportPartStatus.D, report.Parts[1].Status);
        }
Exemplo n.º 5
0
        public void Test_AddendumCancel()
        {
            Report report = CreateReport();

            report.ActivePart.Complete();

            ReportPart addendum = report.AddAddendum();

            addendum.Cancel();

            // check basics
            Assert.AreEqual(ReportStatus.F, report.Status);     // report is still considered final, since only the addendum was cancelled
            Assert.IsNull(report.CorrectedTime);                // no corrected time
            Assert.AreEqual(2, report.Parts.Count);
            Assert.AreEqual(ReportPartStatus.F, report.Parts[0].Status);
            Assert.AreEqual(ReportPartStatus.X, report.Parts[1].Status);
        }
Exemplo n.º 6
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);
        }
Exemplo n.º 7
0
        public void Test_AddAddendumToDraft()
        {
            Report report = CreateReport();

            report.AddAddendum();
        }