예제 #1
0
        public void TestStateTypeProperty()
        {
            var obj = new ActionImpl();

            Assert.That(obj.StateType, Is.EqualTo(VariantType.Int32));
            Assert.That(obj.GetProperty("state-type"), Is.EqualTo(VariantType.Int32));
        }
예제 #2
0
        public void TestParameterTypeProperty()
        {
            var obj = new ActionImpl();

            Assert.That(obj.ParameterType, Is.EqualTo(VariantType.Int32));
            Assert.That(obj.GetProperty("parameter-type"), Is.EqualTo(VariantType.Int32));
        }
예제 #3
0
        public void TestStateProperty()
        {
            var obj = new ActionImpl();

            Assert.That((int)obj.State, Is.EqualTo(2));
            Assert.That((int)obj.GetProperty("state"), Is.EqualTo(2));
        }
예제 #4
0
        public void TestNameProperty()
        {
            var obj = new ActionImpl();

            Assert.That(obj.Name, Is.EqualTo("TestActionName"));
            Assert.That(obj.GetProperty("name"), Is.EqualTo("TestActionName"));
        }
예제 #5
0
        public void TestEnabledProperty()
        {
            var obj = new ActionImpl();

            Assert.That(obj.Enabled, Is.True);
            Assert.That(obj.GetProperty("enabled"), Is.True);
        }
예제 #6
0
        public void TestThatChangeStateImplementationIsCalled()
        {
            var obj   = new ActionImpl();
            var value = new Variant(1);

            Assume.That(obj.ChangeStateCallbackCount, Is.EqualTo(0));
            obj.ChangeState(value);
            Assert.That(obj.ChangeStateCallbackCount, Is.EqualTo(1));
        }
예제 #7
0
        public void TestThatActivateImplementationIsCalled()
        {
            var obj       = new ActionImpl();
            var parameter = new Variant(1);

            Assume.That(obj.ActivateCallbackCount, Is.EqualTo(0));
            obj.Activate(parameter);
            Assert.That(obj.ActivateCallbackCount, Is.EqualTo(1));
        }
예제 #8
0
        public void TestThatGetNameImplementationIsCalled()
        {
            var obj = new ActionImpl();

            Assume.That(obj.GetNameCallbackCount, Is.EqualTo(0));
            var actual = obj.GetName();

            Assert.That(actual, Is.EqualTo("TestActionName"));
            Assert.That(obj.GetNameCallbackCount, Is.EqualTo(1));
        }
예제 #9
0
        public void TestThatGetEnabledImplementationIsCalled()
        {
            var obj = new ActionImpl();

            Assume.That(obj.GetEnabledCallbackCount, Is.EqualTo(0));
            var actual = obj.GetEnabled();

            Assert.That(actual, Is.True);
            Assert.That(obj.GetEnabledCallbackCount, Is.EqualTo(1));
        }
예제 #10
0
        public void TestThatGetStateTypeImplementationIsCalled()
        {
            var obj = new ActionImpl();

            Assume.That(obj.GetStateTypeCallbackCount, Is.EqualTo(0));
            var actual = obj.GetStateType();

            Assert.That(actual, Is.EqualTo(VariantType.Int32));
            Assert.That(obj.GetStateTypeCallbackCount, Is.EqualTo(1));
        }
예제 #11
0
        public void TestThatGetStateHintImplementationIsCalled()
        {
            var obj = new ActionImpl();

            Assume.That(obj.GetStateHintCallbackCount, Is.EqualTo(0));
            var actual = obj.GetStateHint();

            Assert.That(actual, Is.Null);
            Assert.That(obj.GetStateHintCallbackCount, Is.EqualTo(1));
        }
예제 #12
0
        public void TestThatGetStateImplementationIsCalled()
        {
            var obj = new ActionImpl();

            Assume.That(obj.GetStateCallbackCount, Is.EqualTo(0));
            var actual = obj.GetState();

            Assert.That((int)actual, Is.EqualTo(2));
            Assert.That(obj.GetStateCallbackCount, Is.EqualTo(1));
        }