public void AggregateRowGetKeyReturnsKeyForStatisticalRow() { var row = new AggregateStatisticalRow("statisticalKey", new JObject()); var key = AggregateRow.GetKey(row); Assert.Equal(row.Key, key); }
public void AggregateStatisticalRowGetValueParsesSingleFacetForDouble() { var row = new AggregateStatisticalRow(2.00, expectedFacets); var actual = row.GetValue("single", "double", typeof(double)); Assert.Equal(5.01, actual); }
public void AggregateStatisticalRowGetValueParsesMultipleFacetsForString() { var row = new AggregateStatisticalRow("", expectedFacets); var actual = row.GetValue("multi", "string", typeof(string)); Assert.Equal("piece-of", actual); }
public void AggregateStatisticalRowGetValueParsesMultipleFacetsForInt() { var row = new AggregateStatisticalRow(1, expectedFacets); var actual = row.GetValue("multi", "integer", typeof(int)); Assert.Equal(19, actual); }
public void AggregateStatisticalRowGetValueDefaultsStringValue() { var row = new AggregateStatisticalRow("3", expectedFacets); var actual = row.GetValue("missing", "string", typeof(string)); Assert.Equal(default(string), actual); }
public void AggregateStatisticalRowGetValueDefaultsIntValue() { var row = new AggregateStatisticalRow(4, expectedFacets); var actual = row.GetValue("missing", "int", typeof(int)); Assert.Equal(default(int), actual); }