示例#1
0
        public void AggregateRowGetKeyReturnsKeyForStatisticalRow()
        {
            var row = new AggregateStatisticalRow("statisticalKey", new JObject());

            var key = AggregateRow.GetKey(row);

            Assert.Equal(row.Key, key);
        }
示例#2
0
        public void AggregateStatisticalRowGetValueParsesSingleFacetForDouble()
        {
            var row = new AggregateStatisticalRow(2.00, expectedFacets);

            var actual = row.GetValue("single", "double", typeof(double));

            Assert.Equal(5.01, actual);
        }
示例#3
0
        public void AggregateStatisticalRowGetValueParsesMultipleFacetsForString()
        {
            var row = new AggregateStatisticalRow("", expectedFacets);

            var actual = row.GetValue("multi", "string", typeof(string));

            Assert.Equal("piece-of", actual);
        }
示例#4
0
        public void AggregateStatisticalRowGetValueParsesMultipleFacetsForInt()
        {
            var row = new AggregateStatisticalRow(1, expectedFacets);

            var actual = row.GetValue("multi", "integer", typeof(int));

            Assert.Equal(19, actual);
        }
示例#5
0
        public void AggregateStatisticalRowGetValueDefaultsStringValue()
        {
            var row = new AggregateStatisticalRow("3", expectedFacets);

            var actual = row.GetValue("missing", "string", typeof(string));

            Assert.Equal(default(string), actual);
        }
示例#6
0
        public void AggregateStatisticalRowGetValueDefaultsIntValue()
        {
            var row = new AggregateStatisticalRow(4, expectedFacets);

            var actual = row.GetValue("missing", "int", typeof(int));

            Assert.Equal(default(int), actual);
        }