Ejemplo n.º 1
0
        /// <summary>
        /// Stuurt een DayChartData naar de caller
        /// </summary>
        public void RequestDayChart(bool includeDeleted = false)
        {
            using (ISendSMSHostContext db = new SendSMSHostContext())
            {
                IChartDataFactory chartDataFactory = new DayChartDataFactory();
                ChartData         chartdata        = chartDataFactory?.CreateChartData(db, includeDeleted);

                Clients.Caller.notifyChangeDayChart(chartdata);
            }
        }
Ejemplo n.º 2
0
        public void DaySummaryCreateChartDataTest_StatusCreatedCount()
        {
            // Arrange
            IChartDataFactory summaryFactory = new DayChartDataFactory();

            // Act
            ChartData chartData = summaryFactory.CreateChartData(db, includeDeleted: false);

            // Assert
            int expectedValue = 2;
            int actualValue   = CountStatusInDataset(chartData, "Created");

            Assert.IsTrue(actualValue == expectedValue,
                          "Count of Status Created");
        }
Ejemplo n.º 3
0
        public void DaySummaryCreateChartDataTest_IntervalCount()
        {
            // Arrange
            IChartDataFactory summaryFactory = new DayChartDataFactory();

            // Act
            ChartData chartData = summaryFactory.CreateChartData(db, includeDeleted: false);

            // Assert
            int expectedValue = 24;
            int actualValue   = chartData.Labels.Length;

            Assert.IsTrue(actualValue == expectedValue,
                          "Count of Label");
        }