Exemplo n.º 1
0
        public void Test_TAGProcessorStateBase_SetICMachineSpeedValue()
        {
            var state = new TAGProcessorStateBase();

            Assert.True(state.ICMachineSpeedValues.GetLatest() == Consts.NullDouble, "Initial value incorrect");
            state.SetICMachineSpeedValue(100);
            Assert.True(state.ICMachineSpeedValues.NumAttrs == 2 && state.ICMachineSpeedValues.GetLatest() == 100, "Initial value incorrect");
        }
Exemplo n.º 2
0
        public void Test_TAGProcessorStateBase_GetLatestMachineSpeed()
        {
            var state = new TAGProcessorStateBase();

            Assert.Equal(state.GetLatestMachineSpeed(), Consts.NullDouble);
            state.SetICMachineSpeedValue(100);
            Assert.Equal(100, state.GetLatestMachineSpeed());
        }
Exemplo n.º 3
0
        public override bool ProcessDoubleValue(TAGValueMatcherState state, TAGProcessorStateBase valueSink,
                                                TAGDictionaryItem valueType, double value)
        {
            state.HaveSeenMachineSpeed = true;
            valueSink.SetICMachineSpeedValue(value);

            return(true);
        }