public static SqlDouble Average(string jsonData, string expression) { var average = JSONQuery.GetAvg(jsonData, expression); if (average != null) { return(new SqlDouble(average.Value)); } return(new SqlDouble()); }
public void When_element_not_able_to_aggregated_return_null(string expression) { var found = JSONQuery.GetAvg(JsonTestData, expression); Assert.IsNull(found); }
public void When_element_in_chain_of_arrays_requested_return_average_of_all_values(string expression, double expected) { var found = JSONQuery.GetAvg(JsonTestData, expression); Assert.AreEqual(expected, found.Value); }