public void InterventionStatisticMapperCreationTest()
        {
            List <String> complaints = new List <String>();

            Statistic.setOperationID("operation4");
            InterventionStatisticMapper ism = new InterventionStatisticMapper();

            complaints = ism.getListComplaint();
            Assert.AreEqual(complaints.Count, ism.getListComplaint().Count);
        }
예제 #2
0
        private void GenerateComplainName()
        {
            ism = new InterventionStatisticMapper();

            foreach (String complaint in ism.getListComplaint())
            {
                RowDefinition rd = new RowDefinition();
                rd.Height = new GridLength(40);
                ComplaintGrid.RowDefinitions.Add(rd);
                Border border = new Border();
                border.BorderThickness = new Thickness(1, 0, 5, 1);
                border.BorderBrush     = new SolidColorBrush(Colors.Black);
                TextBlock tb = new TextBlock();
                tb.FontWeight          = FontWeights.Bold;
                tb.Height              = 40;
                tb.FontSize            = 13;
                tb.Margin              = new Thickness(5, 0, 0, 0);
                tb.VerticalAlignment   = VerticalAlignment.Center;
                tb.HorizontalAlignment = HorizontalAlignment.Center;
                tb.TextWrapping        = TextWrapping.Wrap;
                displayComplaint       = StaticDBConnection.GetResource(complaint);
                tb.Name      = complaint;
                tb.Text      = displayComplaint;
                border.Child = tb;
                ComplaintGrid.Children.Add(border);
                Grid.SetColumn(border, 0);
                Grid.SetRow(border, count);
                GenerateInterventionWithoutAmbulance(count, complaint);
                GenerateInterventionWithAmbulance(count, complaint);
                GenerateTotalTableHorizontal(count);

                //resetting the total counters
                countWithoutAmbulance  = 0;
                countWithAmbulance     = 0;
                totalChildrenHoriCount = 0;
                totalAdultHoriCount    = 0;

                count++;
            }
            StaticDBConnection.CloseConnection();
            GenerateTotalTableVertical(count);
            totalChildrenVertical = 0;
            totalAdultVertical    = 0;
        }
        public void InterventionStatisticMapperAdultATestCount()
        {
            Statistic.setOperationID("operation4");
            InterventionStatisticMapper ism = new InterventionStatisticMapper();
            List <String> complaints        = new List <String>();

            complaints = ism.getListComplaint();
            String firstComplaint = complaints[0];

            ism.getInterventionAdultWithAmublanceCount(firstComplaint);
            List <int> interventionAdultList = new List <int>();

            interventionAdultList = ism.getInterventionAdultWithAmublanceList();
            Assert.AreEqual(interventionAdultList.Count, ism.getInterventionAdultWithAmublanceList().Count);
            ism.clearInterventionAdultACountList();
            Assert.AreEqual(0, ism.getInterventionAdultWithAmublanceList().Count);

            ism.getInterventionAdultWithAmublanceCount("TESTING_NULL");
            interventionAdultList = ism.getInterventionAdultWithAmublanceList();
            Assert.AreEqual(0, interventionAdultList[0]);
        }