Example #1
0
        public void Constructor_WithParameterValues_PropertiesAreSet()
        {
            var spec = new ArithmeticPostAggregator("average", ArithmeticFunction.Divide, null, new FieldAccessPostAggregator("loaded", "my_loaded"), new FieldAccessPostAggregator("total", "my_total"));

            Assert.That(spec.Fn, Is.EqualTo("/"));
            Assert.That(spec.Name, Is.EqualTo("average"));
            Assert.That(spec.Ordering, Is.Null);
            Assert.That(spec.Fields.Count(), Is.EqualTo(2));
        }
Example #2
0
        public void Constructor_WithQuotientFunction_FunctionIsSet()
        {
            var spec = new ArithmeticPostAggregator("average", ArithmeticFunction.Quotient, null);

            Assert.That(spec.Fn, Is.EqualTo("quotient"));
        }
Example #3
0
        public void Constructor_WithDivideFunction_FunctionIsSet()
        {
            var spec = new ArithmeticPostAggregator("average", ArithmeticFunction.Divide, null);

            Assert.That(spec.Fn, Is.EqualTo("/"));
        }
Example #4
0
        public void Constructor_TypeIsCorrect()
        {
            var spec = new ArithmeticPostAggregator("average", ArithmeticFunction.Divide, null);

            Assert.That(spec.Type, Is.EqualTo("arithmetic"));
        }