Ejemplo n.º 1
0
        public void AggregateRowGetKeyReturnsKeyForStatisticalRow()
        {
            var row = new AggregateStatisticalRow("statisticalKey", new JObject());

            var key = AggregateRow.GetKey(row);

            Assert.Equal(row.Key, key);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        public void AggregateStatisticalRowGetValueParsesMultipleFacetsForString()
        {
            var row = new AggregateStatisticalRow("", expectedFacets);

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

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

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

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

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

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

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

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