protected static void AssertScalarField(FieldSet fieldSet, int fieldIndex, Type type, String name, Operator operator_ren) { var field = (Scalar)fieldSet.GetField(fieldIndex); AssertScalarField(field, type, name); Assert.AreEqual(operator_ren, field.Operator); }
protected static void AssertScalarField(FieldSet fieldSet, int fieldIndex, Type type, String name, OperatorCodec operator_ren, ScalarValue defaultValue) { var field = (Scalar)fieldSet.GetField(fieldIndex); AssertScalarField(field, type, name); Assert.AreEqual(operator_ren, field.OperatorCodec); Assert.AreEqual(defaultValue, field.DefaultValue); }
protected static void AssertComposedScalarField(FieldSet fieldSet, int fieldIndex, Type type, String name, Operator exponentOp, ScalarValue exponentValue, Operator mantissaOp, ScalarValue mantissaValue) { var field = (ComposedScalar)fieldSet.GetField(fieldIndex); Assert.AreEqual(type, field.Type); Assert.AreEqual(name, field.Name); Scalar[] fields = field.Fields; Assert.AreEqual(exponentOp, fields[0].Operator); Assert.AreEqual(exponentValue, fields[0].DefaultValue); Assert.AreEqual(mantissaOp, fields[1].Operator); Assert.AreEqual(mantissaValue, fields[1].DefaultValue); }