/// <summary>
        /// Stuurt een WeekChartData naar de caller
        /// </summary>
        public void RequestWeekChart(bool includeDeleted = false)
        {
            using (ISendSMSHostContext db = new SendSMSHostContext())
            {
                IChartDataFactory chartDataFactory = new WeekChartDataFactory();
                ChartData         chartdata        = chartDataFactory?.CreateChartData(db, includeDeleted);

                Clients.Caller.notifyChangeWeekChart(chartdata);
            }
        }
Example #2
0
        public void WeekSummaryCreateChartDataTest_StatusCreatedCount()
        {
            // Arrange
            IChartDataFactory summaryFactory = new WeekChartDataFactory();

            // 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");
        }
Example #3
0
        public void WeekSummaryCreateChartDataTest_IntervalCount()
        {
            // Arrange
            IChartDataFactory summaryFactory = new WeekChartDataFactory();

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

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

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