public void CountEventTest() { Field testField = Model.MatrixFields[0]; String listCount = DBWorker.GetCountFromSqlStatement(DBWorker.CreateEventCountSqlStatement(Model.SelectedDimensions, testField)); Assert.IsNotNull(listCount, "Empty list"); Assert.AreEqual("11030", listCount, "Correct list count"); }
/// <summary> /// Reacts to a click on a field in the matrix /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <author>Jannik Arndt, Bernhard Bruns</author> private void FieldClick(object sender, RoutedEventArgs e) { Cursor = Cursors.Wait; if (sender.GetType() == typeof(Button)) { Field field = (((Button)sender).Tag as Field); if (field != null) { field.ContentCounterTextChanged = "\nEvents: " + DBWorker.GetCountFromSqlStatement(DBWorker.CreateEventCountSqlStatement(MainWindow.MatrixSelection.SelectedDimensions, field)) + " (Unique: " + DBWorker.GetCountFromSqlStatement(DBWorker.CreateUniqueEventCountSqlStatement(MainWindow.MatrixSelection.SelectedDimensions, field)) + ")"; field.ContentCounterTextChanged += "\nCases: " + DBWorker.GetCountFromSqlStatement(DBWorker.CreateCaseCountSqlStatement(MainWindow.MatrixSelection.SelectedDimensions, field)); } } Cursor = Cursors.Arrow; }