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)); }
public void Constructor_WithQuotientFunction_FunctionIsSet() { var spec = new ArithmeticPostAggregator("average", ArithmeticFunction.Quotient, null); Assert.That(spec.Fn, Is.EqualTo("quotient")); }
public void Constructor_WithDivideFunction_FunctionIsSet() { var spec = new ArithmeticPostAggregator("average", ArithmeticFunction.Divide, null); Assert.That(spec.Fn, Is.EqualTo("/")); }
public void Constructor_TypeIsCorrect() { var spec = new ArithmeticPostAggregator("average", ArithmeticFunction.Divide, null); Assert.That(spec.Type, Is.EqualTo("arithmetic")); }