Пример #1
0
        public void PdfVetAggregateCaseActionsSummaryTest()
        {
            const string aggrXml =
                @"<?xml version=""1.0"" encoding=""UTF-16""?><ROOT><AdminLevel AreaType=""satCountry""><AdminUnit AdminUnitID=""170000000"" /></AdminLevel><TimeInterval PeriodType=""sptYear""><TimeIntervalUnit StartDate=""2009-01-01"" FinishDate=""2011-12-31"" /><TimeIntervalUnit StartDate=""2008-01-01"" FinishDate=""2008-12-31"" /></TimeInterval></ROOT>";
            var observations = new long[] { 1, 2 };
            var labels       = new Dictionary <string, string>
            {
                { "@diagnosticTexten", "x" },
                { "@sanitaryTexten", "y" },
                { "@prophylacticTexten", "z" }
            };
            var ps = new AggregateActionsSummaryModel("en", aggrXml, observations, observations, observations, labels, false);

            AssertPDF(m_Facade.ExportVetAggregateCaseActionsSummary(ps));
        }
Пример #2
0
        private static List <Task> CreateTasks()
        {
            const string aggrXml =
                @"<?xml version=""1.0"" encoding=""UTF-16""?><ROOT><AdminLevel AreaType=""satCountry""><AdminUnit AdminUnitID=""170000000"" /></AdminLevel><TimeInterval PeriodType=""sptYear""><TimeIntervalUnit StartDate=""2009-01-01"" FinishDate=""2011-12-31"" /><TimeIntervalUnit StartDate=""2008-01-01"" FinishDate=""2008-12-31"" /></TimeInterval></ROOT>";
            var observations = new List <long> {
                1, 2
            };
            var labels = new Dictionary <string, string>
            {
                { "@diagnosticTexten", "x" },
                { "@sanitaryTexten", "y" },
                { "@prophylacticTexten", "z" }
            };

            Action humAggregateCase =
                () =>
                AssertPdfAction(
                    wrapper => wrapper.Client.ExportHumAggregateCase(new AggregateModel("en", 1, 6707800000000, 2, false)),
                    "PdfHumAggregateCase");

            Action humAggregateCaseSummary =
                () =>
                AssertPdfAction(
                    wrapper =>
                    wrapper.Client.ExportHumAggregateCaseSummary(
                        new AggregateSummaryModel("en", aggrXml, observations, false)),
                    "PdfHumAggregateCaseSummary");
            Action humUrgentyNotification =
                () =>
                AssertPdfAction(
                    wrapper =>
                    wrapper.Client.ExportHumUrgentyNotification(new BaseIdModel("en", 45820000633, false)),
                    "PdfHumUrgentyNotification");

            Action humCaseInvestigation =
                () =>
                AssertPdfAction(
                    wrapper =>
                    wrapper.Client.ExportHumCaseInvestigation(new HumIdModel("en", 1, 2, 3, 4, false)),
                    "PdfHumCaseInvestigation");

            Action vetAggregateCase =
                () =>
                AssertPdfAction(
                    wrapper => wrapper.Client.ExportVetAggregateCase(new AggregateModel("en", 1, 6707800000000, 2, false)),
                    "PdfVetAggregateCase");

            Action vetAggregateCaseActions =
                () =>
                AssertPdfAction(
                    wrapper =>
                    wrapper.Client.ExportVetAggregateCaseActions(
                        new AggregateActionsModel("en", 1, 45820000633, 3, 45820000633, 5, 45820000633, 7, labels, false)),
                    "PdfVetAggregateCaseActions");

            Action vetAggregateCaseSummary =
                () =>
                AssertPdfAction(
                    wrapper =>
                    wrapper.Client.ExportVetAggregateCaseSummary(
                        new AggregateSummaryModel("en", aggrXml, observations, false)),
                    "PdfVetAggregateCaseSummary");

            var    asm = new AggregateActionsSummaryModel("en", aggrXml, observations, observations, observations, labels, false);
            Action vetAggregateCaseActionsSummary =
                () =>
                AssertPdfAction(
                    wrapper =>
                    wrapper.Client.ExportVetAggregateCaseActionsSummary(asm),
                    "PdfVetAggregateCaseActionsSummary");

            Action vetAvianInvestigation =
                () =>
                AssertPdfAction(
                    wrapper => wrapper.Client.ExportVetAvianInvestigation(new VetIdModel("en", 1, 2, false, false)),
                    "PdfVetAvianInvestigation");

            Action vetLivestockInvestigation =
                () =>
                AssertPdfAction(
                    wrapper => wrapper.Client.ExportVetLivestockInvestigation(new VetIdModel("en", 1, 2, false, false)),
                    "PdfVetLivestockInvestigation");

            Action vetActiveSurveillanceSampleCollected =
                () =>
                AssertPdfAction(
                    wrapper =>
                    wrapper.Client.ExportVetActiveSurveillanceSampleCollected(new BaseIdModel("en", 1, false)),
                    "PdfVetActiveSurveillanceSampleCollected");

            Action limTestResult =
                () =>
                AssertPdfAction(
                    wrapper => wrapper.Client.ExportLimTestResult(new LimTestResultModel("en", 1, 2, 3, false)),
                    "PdfLimTestResult");

            Action limSampleTransfer =
                () =>
                AssertPdfAction(wrapper => wrapper.Client.ExportLimSampleTransfer(new BaseIdModel("en", 1, false)),
                                "PdfLimSampleTransfer");

            Action limTest =
                () =>
                AssertPdfAction(wrapper => wrapper.Client.ExportLimTest(new LimTestModel("en", 1, true, false)),
                                "PdfLimTest");

            Action batchTest =
                () =>
                AssertPdfAction(
                    wrapper => wrapper.Client.ExportLimBatchTest(new LimBatchTestModel("en", 1, 2, false)),
                    "PdfLimBatchTest");

            Action containerDetails =
                () =>
                AssertPdfAction(
                    wrapper => wrapper.Client.ExportLimSample(new BaseIdModel("en", 1, false)),
                    "PdfLimSample");

            Action containerContent =
                () =>
                AssertPdfAction(
                    wrapper =>
                    wrapper.Client.ExportLimContainerContent(new LimContainerContentModel("en", 1, null, false)),
                    "PdfLimContainerContent");

            Action limAccessionIn =
                () =>
                AssertPdfAction(wrapper => wrapper.Client.ExportLimAccessionIn(new BaseIdModel("en", 1, false)),
                                "PdfLimAccessionIn");

            Action outbreak =
                () =>
                AssertPdfAction(wrapper => wrapper.Client.ExportOutbreak(new BaseIdModel("en", 1, false)),
                                "PdfOutbreak");

            var tasks = new List <Task>
            {
                new Task(outbreak),
                new Task(humAggregateCase),
                new Task(humAggregateCaseSummary),
                new Task(humUrgentyNotification),
                new Task(humCaseInvestigation),
                new Task(vetAggregateCase),
                new Task(vetAggregateCaseSummary),
                new Task(vetAggregateCaseActions),
                new Task(vetAggregateCaseActionsSummary),
                new Task(vetAvianInvestigation),
                new Task(vetLivestockInvestigation),
                new Task(vetActiveSurveillanceSampleCollected),
                new Task(limTestResult),
                new Task(limSampleTransfer),
                new Task(limTest),
                new Task(batchTest),
                new Task(containerDetails),
                new Task(containerContent),
                new Task(limAccessionIn)
            };

            return(tasks);
        }
Пример #3
0
        private static Action[] CreateTasks()
        {
            const string aggrXml =
                @"<?xml version=""1.0"" encoding=""UTF-16""?><ROOT><AdminLevel AreaType=""satCountry""><AdminUnit AdminUnitID=""170000000"" /></AdminLevel><TimeInterval PeriodType=""sptYear""><TimeIntervalUnit StartDate=""2009-01-01"" FinishDate=""2011-12-31"" /><TimeIntervalUnit StartDate=""2008-01-01"" FinishDate=""2008-12-31"" /></TimeInterval></ROOT>";
            var observations = new List <long> {
                1, 2
            };
            var labels = new Dictionary <string, string>
            {
                { "@diagnosticTexten", "x" },
                { "@sanitaryTexten", "y" },
                { "@prophylacticTexten", "z" }
            };

            Action humAggregateCase =
                () =>
                AssertPDF(m_Facade.ExportHumAggregateCase(
                              new AggregateModel("en", 1, 1, 2, false)));

            Action humAggregateCaseSummary =
                () =>
                AssertPDF(m_Facade.ExportHumAggregateCaseSummary(
                              new AggregateSummaryModel("en", aggrXml, observations, false)));

            Action humUrgentyNotification =
                () => AssertPDF(m_Facade.ExportHumUrgentyNotification(new BaseIdModel("en", 45820000633, false)));

            Action humCaseInvestigation =
                () =>
                AssertPDF(m_Facade.ExportHumCaseInvestigation(
                              new HumIdModel("en", 45820000633, 45830000633, 45840000633, 784230000000, false)));

            Action vetAggregateCase =
                () =>
                AssertPDF(m_Facade.ExportVetAggregateCase(
                              new AggregateModel("en", 1, 1, 2, false)));

            Action vetAggregateCaseActions =
                () =>
                AssertPDF(m_Facade.ExportVetAggregateCaseActions(
                              new AggregateActionsModel("en", 1, 2, 3, 4, 5, 6, 7, labels, false)));

            Action vetAggregateCaseSummary =
                () =>
                AssertPDF(m_Facade.ExportVetAggregateCaseSummary(
                              new AggregateSummaryModel("en", aggrXml, observations, false)));

            var    parameters = new AggregateActionsSummaryModel("en", aggrXml, observations, observations, observations, labels, false);
            Action vetAggregateCaseActionsSummary =
                () => AssertPDF(m_Facade.ExportVetAggregateCaseActionsSummary(parameters));

            Action vetAvianInvestigation =
                () => AssertPDF(m_Facade.ExportVetAvianInvestigation(new VetIdModel("en", 1, 2, false, BaseSettings.PrintMapInVetReports)));

            Action vetLivestockInvestigation =
                () => AssertPDF(m_Facade.ExportVetLivestockInvestigation(new VetIdModel("en", 1, 2, false, BaseSettings.PrintMapInVetReports)));

            Action vetActiveSurveillanceSampleCollected =
                () => AssertPDF(m_Facade.ExportVetActiveSurveillanceSampleCollected(new BaseIdModel("en", 1, false)));

            Action limTestResult = () => AssertPDF(m_Facade.ExportLimTestResult(new LimTestResultModel("en", 1, 2, 3, false)));

            Action limSampleTransfer = () => AssertPDF(m_Facade.ExportLimSampleTransfer(new BaseIdModel("en", 1, false)));

            Action limTest = () => AssertPDF(m_Facade.ExportLimTest(new LimTestModel("en", 1, true, false)));

            Action batchTest = () => AssertPDF(m_Facade.ExportLimBatchTest(new LimBatchTestModel("en", 1, 2, false)));

            Action containerDetails = () => AssertPDF(m_Facade.ExportLimSample(new BaseIdModel("en", 1, false)));

            Action containerContent =
                () =>
                AssertPDF(m_Facade.ExportLimContainerContent(new LimContainerContentModel("en", 1, null, false)));

            Action limAccessionIn = () => AssertPDF(m_Facade.ExportLimAccessionIn(new BaseIdModel("en", 1, false)));

            Action outbreak = () => AssertPDF(m_Facade.ExportOutbreak(new BaseIdModel("en", 1, false)));

            var tasks = new[]
            {
                outbreak,
                humAggregateCase,
                humAggregateCaseSummary,
                humUrgentyNotification,
                humCaseInvestigation,
                vetAggregateCase,
                vetAggregateCaseSummary,
                vetAggregateCaseActions,
                vetAggregateCaseActionsSummary,
                vetAvianInvestigation,
                vetLivestockInvestigation,
                vetActiveSurveillanceSampleCollected,
                limTestResult,
                limSampleTransfer,
                limTest,
                batchTest,
                containerDetails,
                containerContent,
                limAccessionIn
            };

            return(tasks);
        }