Example #1
0
        public CommonValueInstance(CommonValueDefinition theDefinition, TestExecution testExecution)
            : base(theDefinition, testExecution)
        {
            if (theDefinition.GlobalValue == null)
            {
                throw new ArgumentException(Name + " doesn't have GlobalValue defined.");
            }

            switch (theDefinition.ReadStyle)
            {
            case CommonValueDefinition.DataReadStyle.AtTrigger:
                if (theDefinition.mHelperTool == null)
                {
                    throw new ArgumentException("askjdkljsdhf");
                }
                theDefinition.mHelperTool.CurrentInstance.ValueGetter = new AtTriggerValueGetter(theDefinition.GlobalValue);
                mValueGetter = theDefinition.mHelperTool.CurrentInstance.ValueGetter;
                break;

            case CommonValueDefinition.DataReadStyle.Live:
                mValueGetter = new LiveValueGetter(theDefinition.GlobalValue);
                break;

            default:
                throw new ArgumentException("CommonValue '" + Name + "' has an unsupported ReadStyle. ReadStyle=" + theDefinition.ReadStyle);
                break;
            }
        }
Example #2
0
 public AtTriggerValueGetterToolDefinition(TestSequence testSequence, CommonValueDefinition theCommonValueDef)
     : base(testSequence)
 {
     mCommonValueDefinition = theCommonValueDef;
     Name = mCommonValueDefinition.Name + "Helper";
 }