You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2020/03/06 08:11:46 UTC

[royale-asjs] branch develop updated: Another part of the missing pieces.

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new fe3701a  Another part of the missing pieces.
     new 1e99cc1  Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
fe3701a is described below

commit fe3701ae1a0158774987a329d29e9eec447434e1
Author: greg-dove <gr...@gmail.com>
AuthorDate: Fri Mar 6 21:10:59 2020 +1300

    Another part of the missing pieces.
---
 .../flexUnitTests/binding/BindableCoreTests.as     | 298 +++++++++++++++++++++
 .../flexUnitTests/binding/BindingCoreTests.as      | 259 ++++++++++++++++++
 2 files changed, 557 insertions(+)

diff --git a/frameworks/projects/Binding/src/test/royale/flexUnitTests/binding/BindableCoreTests.as b/frameworks/projects/Binding/src/test/royale/flexUnitTests/binding/BindableCoreTests.as
new file mode 100644
index 0000000..42204c5
--- /dev/null
+++ b/frameworks/projects/Binding/src/test/royale/flexUnitTests/binding/BindableCoreTests.as
@@ -0,0 +1,298 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package flexUnitTests.binding
+{
+
+COMPILE::Royale{
+    import org.apache.royale.test.asserts.*;
+    import org.apache.royale.events.IEventDispatcher;
+}
+
+COMPILE::Flex{
+    import royale.flexunitcompatible.asserts.*;
+    import flash.events.IEventDispatcher;
+}
+
+
+
+import flexUnitTests.binding.support.bindables.*;
+import flexUnitTests.binding.utils.BindableTestUtil;
+
+public class BindableCoreTests
+{
+
+
+    public static var testUtil:BindableTestUtil;
+
+    [BeforeClass]
+    public static function setUpBeforeClass():void
+    {
+        testUtil = BindableTestUtil.instance;
+    }
+
+    [AfterClass]
+    public static function tearDownAfterClass():void
+    {
+        testUtil.reset();
+        testUtil = null;
+    }
+
+    [Before]
+    public function setUp():void
+    {
+
+    }
+
+    [After]
+    public function tearDown():void
+    {
+        testUtil.reset();
+    }
+
+    //no bindings, UnBindable is not IEventDispatcher
+    [Test]
+    public function testBasicUnbindable():void
+    {
+        var unbindable:UnbindableBase = new UnbindableBase();
+
+        assertFalse(unbindable is IEventDispatcher, 'unbindable should not have IEventDispatcher-ness')
+    }
+
+    [Test]
+    public function testBasicBindableVar():void
+    {
+        // a variable member is marked [Bindable], but the class itself is not
+        testUtil.reset();
+        var bindable:BaseWithBindableVar = new BaseWithBindableVar();
+
+        assertTrue(bindable is IEventDispatcher, 'bindable should have IEventDispatcher-ness');
+
+        var bindableDispatcher:IEventDispatcher = bindable as IEventDispatcher;
+        testUtil.listenTo(bindableDispatcher, BindableTestUtil.VALUE_CHANGE_EVENT);
+
+        bindable.bindableVarOfBaseWithBindableVar = 'a new assigned value';
+        bindable.bindableVarOfBaseWithBindableVar = 'a second assigned value';
+
+        var expected:String =
+                '0:ValueChangeEvent::property(bindableVarOfBaseWithBindableVar), oldVal:(bindableVarOfBaseWithBindableVar_value), newValue:(a new assigned value)\n' +
+                '1:ValueChangeEvent::property(bindableVarOfBaseWithBindableVar), oldVal:(a new assigned value), newValue:(a second assigned value)';
+
+        assertEquals(testUtil.getSequenceString(), expected, 'Unexpected results from changes to a "bindable"');
+
+        testUtil.reset();
+    }
+
+    [Test]
+    public function testBasicBindableClass():void
+    {
+        // a class is marked [Bindable], but not its variable member(s)
+        testUtil.reset();
+        var bindable:BaseWithBindableClass = new BaseWithBindableClass();
+
+        assertTrue(bindable is IEventDispatcher, 'bindable should have IEventDispatcher-ness');
+
+        var bindableDispatcher:IEventDispatcher = bindable as IEventDispatcher;
+        testUtil.listenTo(bindableDispatcher, BindableTestUtil.VALUE_CHANGE_EVENT);
+
+        bindable.varOfBaseWithBindableClass = 'a new assigned value';
+        bindable.varOfBaseWithBindableClass = 'a second assigned value';
+
+        var expected:String =
+                '0:ValueChangeEvent::property(varOfBaseWithBindableClass), oldVal:(varOfBaseWithBindableClass_value), newValue:(a new assigned value)\n' +
+                '1:ValueChangeEvent::property(varOfBaseWithBindableClass), oldVal:(a new assigned value), newValue:(a second assigned value)';
+
+        assertEquals(testUtil.getSequenceString(), expected, 'Unexpected results from changes to a "bindable"');
+
+        testUtil.reset();
+    }
+
+
+    [Test]
+    public function testBasicBindableAndUnbindableVar():void
+    {
+        // a variable member is marked [Bindable] and another is not, and the class itself is not [Bindable]
+        testUtil.reset();
+        var bindable:BaseWithBindableAndUnbindableVars = new BaseWithBindableAndUnbindableVars();
+
+        assertTrue(bindable is IEventDispatcher, 'bindable should have IEventDispatcher-ness');
+
+        var bindableDispatcher:IEventDispatcher = bindable as IEventDispatcher;
+        testUtil.listenTo(bindableDispatcher, BindableTestUtil.VALUE_CHANGE_EVENT);
+
+        bindable.bindableVarOfBaseWithBindableAndUnbindableVars = 'a new assigned value for bindable';
+        bindable.unbindableVarOfBaseWithBindableAndUnbindableVars = 'a new assigned value for unbindable';
+        bindable.bindableVarOfBaseWithBindableAndUnbindableVars = 'a second assigned value for bindable';
+        bindable.unbindableVarOfBaseWithBindableAndUnbindableVars = 'a second assigned value for unbindable';
+        //events are only expected from the Bindable member:
+        var expected:String =
+                '0:ValueChangeEvent::property(bindableVarOfBaseWithBindableAndUnbindableVars), oldVal:(bindableVarOfBaseWithBindableAndUnbindableVars_value), newValue:(a new assigned value for bindable)\n' +
+                '1:ValueChangeEvent::property(bindableVarOfBaseWithBindableAndUnbindableVars), oldVal:(a new assigned value for bindable), newValue:(a second assigned value for bindable)';
+
+        assertEquals(testUtil.getSequenceString(), expected, 'Unexpected results from changes to a "bindable"');
+
+        testUtil.reset();
+    }
+
+    [Test]
+    public function testBasicBindableGetter():void
+    {
+        // an accessor member is marked [Bindable], but the class itself is not
+        testUtil.reset();
+        var bindable:BaseWithBindableGetter = new BaseWithBindableGetter();
+
+        assertTrue(bindable is IEventDispatcher, 'bindable should have IEventDispatcher-ness');
+
+        var bindableDispatcher:IEventDispatcher = bindable as IEventDispatcher;
+        testUtil.listenTo(bindableDispatcher, BindableTestUtil.VALUE_CHANGE_EVENT);
+
+        bindable.accessorOfBaseWithBindableGetter = 'a new assigned value';
+        bindable.accessorOfBaseWithBindableGetter = 'a second assigned value';
+
+
+        var expected:String =
+                '0:history:accessing value from original getter , accessorOfBaseWithBindableGetter_value\n' +
+                '1:history:assigning value in original setter , a new assigned value\n' +
+                '2:ValueChangeEvent::property(accessorOfBaseWithBindableGetter), oldVal:(accessorOfBaseWithBindableGetter_value), newValue:(a new assigned value)\n' +
+                '3:history:accessing value from original getter , a new assigned value\n' +
+                '4:history:assigning value in original setter , a second assigned value\n' +
+                '5:ValueChangeEvent::property(accessorOfBaseWithBindableGetter), oldVal:(a new assigned value), newValue:(a second assigned value)';
+
+        assertEquals(testUtil.getSequenceString(), expected, 'Unexpected results from changes to a "bindable"');
+
+        testUtil.reset();
+    }
+
+
+    [Test]
+    public function testBasicBindableGetterVariations():void
+    {
+        // an accessor member is marked [Bindable], but the class itself is not
+        testUtil.reset();
+        var bindable:BaseWithBindableGetter = new BaseWithBindableGetter();
+
+        assertTrue(bindable is IEventDispatcher, 'bindable should have IEventDispatcher-ness');
+
+        var bindableDispatcher:IEventDispatcher = bindable as IEventDispatcher;
+        testUtil.listenTo(bindableDispatcher, BindableTestUtil.VALUE_CHANGE_EVENT);
+        testUtil.listenTo(bindableDispatcher,'testEvent');
+        testUtil.listenTo(bindableDispatcher,'somethingChanged');
+
+        bindable.accessorOfBaseWithBindableGetter2 = 'a new assigned value';
+        bindable.accessorOfBaseWithBindableGetter2 = 'a second assigned value';
+        bindable.something = 'this does not dispatch';
+
+
+
+        var expected:String =
+                '0:history:accessing value from original getter , _accessorOfBaseWithBindableGetter2_value\n' +
+                '1:history:assigning value in original setter , a new assigned value\n' +
+                '2:Event(type="testEvent", bubbles=false, cancelable=false)\n' +
+                '3:ValueChangeEvent::property(accessorOfBaseWithBindableGetter2), oldVal:(_accessorOfBaseWithBindableGetter2_value), newValue:(a new assigned value)\n' +
+                '4:history:accessing value from original getter , a new assigned value\n' +
+                '5:history:assigning value in original setter , a second assigned value\n' +
+                '6:Event(type="testEvent", bubbles=false, cancelable=false)\n' +
+                '7:ValueChangeEvent::property(accessorOfBaseWithBindableGetter2), oldVal:(a new assigned value), newValue:(a second assigned value)';
+
+        assertEquals(testUtil.getSequenceString(), expected, 'Unexpected results from changes to a "bindable"');
+
+        testUtil.reset();
+    }
+
+
+
+    [Test]
+    public function testBasicBindableClassGetter():void
+    {
+        // a class is marked [Bindable], but not its accessor member(s)
+        testUtil.reset();
+        var bindable:BaseWithGetterBindableClass = new BaseWithGetterBindableClass();
+
+        assertTrue(bindable is IEventDispatcher, 'bindable should have IEventDispatcher-ness');
+
+        var bindableDispatcher:IEventDispatcher = bindable as IEventDispatcher;
+        testUtil.listenTo(bindableDispatcher, BindableTestUtil.VALUE_CHANGE_EVENT);
+
+        bindable.accessorOfBaseWithGetterBindableClass = 'a new assigned value';
+        bindable.accessorOfBaseWithGetterBindableClass = 'a second assigned value';
+
+
+        var expected:String =
+                '0:history:accessing value from original getter , accessorOfBaseWithGetterBindableClass_value\n' +
+                '1:history:assigning value in original setter , a new assigned value\n' +
+                '2:ValueChangeEvent::property(accessorOfBaseWithGetterBindableClass), oldVal:(accessorOfBaseWithGetterBindableClass_value), newValue:(a new assigned value)\n' +
+                '3:history:accessing value from original getter , a new assigned value\n' +
+                '4:history:assigning value in original setter , a second assigned value\n' +
+                '5:ValueChangeEvent::property(accessorOfBaseWithGetterBindableClass), oldVal:(a new assigned value), newValue:(a second assigned value)';
+
+        assertEquals(testUtil.getSequenceString(), expected, 'Unexpected results from changes to a "bindable"');
+
+        testUtil.reset();
+    }
+
+
+    [Test]
+    public function testBindableClassWithAccessorVariations():void
+    {
+        // a class is marked [Bindable], but not its accessor member(s)
+        testUtil.reset();
+        var bindable:BaseWithAccesorVariantsBindableClass = new BaseWithAccesorVariantsBindableClass();
+
+        assertTrue(bindable is IEventDispatcher, 'bindable should have IEventDispatcher-ness');
+
+        var bindableDispatcher:IEventDispatcher = bindable as IEventDispatcher;
+        testUtil.listenTo(bindableDispatcher, BindableTestUtil.VALUE_CHANGE_EVENT);
+        testUtil.listenTo(bindableDispatcher, 'alternateChanged');
+        testUtil.listenTo(bindableDispatcher, 'alternate2Changed');
+
+        bindable.accessorOfBaseWithAccesorVariantsBindableClass = 'a new assigned value';
+        bindable.accessorOfBaseWithAccesorVariantsBindableClass = 'a second assigned value';
+        var val:String = bindable.getterOnly;
+        bindable.setterOnly = 'assigned value for setterOnly with val from getter:' + val;
+        bindable.alternate = 'new value for alternate';
+        bindable.alternate = 'another new value for alternate';
+        bindable.alternate2 = 'new value for alternate2';
+        bindable.alternate2 = 'another new value for alternate2';
+
+
+        var expected:String =
+                '0:history:accessing value from original getter , BaseWithAccessorVariantsBindableClass_value\n' +
+                '1:history:assigning value in original setter , a new assigned value\n' +
+                '2:ValueChangeEvent::property(accessorOfBaseWithAccesorVariantsBindableClass), oldVal:(BaseWithAccessorVariantsBindableClass_value), newValue:(a new assigned value)\n' +
+                '3:history:accessing value from original getter , a new assigned value\n' +
+                '4:history:assigning value in original setter , a second assigned value\n' +
+                '5:ValueChangeEvent::property(accessorOfBaseWithAccesorVariantsBindableClass), oldVal:(a new assigned value), newValue:(a second assigned value)\n' +
+                '6:history:getting non bindable getterOnly , getterOnly\n' +
+                '7:history:setting non bindable setterOnly , assigned value for setterOnly with val from getter:getterOnly\n' +
+                '8:history:setting alternate value with explicit Bindable event , new value for alternate\n' +
+                '9:Event(type="alternateChanged", bubbles=false, cancelable=false)\n' +
+                '10:history:setting alternate value with explicit Bindable event , another new value for alternate\n' +
+                '11:Event(type="alternateChanged", bubbles=false, cancelable=false)\n' +
+                '12:history:setting alternate2 value with both types of Bindable event , new value for alternate2\n' +
+                '13:Event(type="alternate2Changed", bubbles=false, cancelable=false)\n' +
+                '14:history:setting alternate2 value with both types of Bindable event , another new value for alternate2\n' +
+                '15:Event(type="alternate2Changed", bubbles=false, cancelable=false)';
+
+
+        assertEquals(testUtil.getSequenceString(), expected, 'Unexpected results from changes to a "bindable"');
+
+        testUtil.reset();
+    }
+
+}
+}
diff --git a/frameworks/projects/Binding/src/test/royale/flexUnitTests/binding/BindingCoreTests.as b/frameworks/projects/Binding/src/test/royale/flexUnitTests/binding/BindingCoreTests.as
new file mode 100644
index 0000000..60d9bb5
--- /dev/null
+++ b/frameworks/projects/Binding/src/test/royale/flexUnitTests/binding/BindingCoreTests.as
@@ -0,0 +1,259 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package flexUnitTests.binding
+{
+
+COMPILE::Royale{
+    import flexUnitTests.binding.support.bindings.royale.SimpleBindingsA;
+    import flexUnitTests.binding.support.bindings.royale.SimpleBindingsB;
+    import flexUnitTests.binding.support.bindings.royale.FunctionBindingsA;
+    import flexUnitTests.binding.support.bindings.royale.DeepBindingsA;
+    import org.apache.royale.test.asserts.*;
+}
+COMPILE::Flex{
+    import flexUnitTests.binding.support.bindings.flex.SimpleBindingsA;
+    import flexUnitTests.binding.support.bindings.flex.SimpleBindingsB;
+    import flexUnitTests.binding.support.bindings.flex.FunctionBindingsA;
+    import flexUnitTests.binding.support.bindings.flex.DeepBindingsA;
+
+
+    // reverse message arguments between RoyaleUnit and FlexUnit
+    //wild card import does not seem to work here in Flex:
+    //using specific imports:
+    import royale.flexunitcompatible.asserts.assertEquals;
+    import royale.flexunitcompatible.asserts.assertStrictlyEquals;
+}
+
+import flexUnitTests.binding.support.IBindingTest;
+import flexUnitTests.binding.utils.BindingTestUtil;
+
+/**
+ * @royalesuppresspublicvarwarning
+ */
+public class BindingCoreTests
+{
+
+
+    [BeforeClass]
+    public static function setUpBeforeClass():void
+    {
+        COMPILE::Royale{
+            //Main is the Flex application
+            BindingTestUtil.setTestParent(FlexUnitRoyaleApplication.getInstance().bindingsTestParent)
+        }
+        COMPILE::Flex{
+            //Main is the Flex application
+            BindingTestUtil.setTestParent(Main.getInstance().bindingsTestParent)
+        }
+    }
+
+    [AfterClass]
+    public static function tearDownAfterClass():void
+    {
+        BindingTestUtil.reset();
+    }
+
+    private var testInstance:Object;
+
+    [Before]
+    public function setUp():void
+    {
+
+    }
+
+    [After]
+    public function tearDown():void
+    {
+        if (testInstance) {
+            BindingTestUtil.removeInstance(testInstance);
+        }
+    }
+
+    private function createTestInstance(clazz:Class):IBindingTest{
+        return (testInstance =  BindingTestUtil.createAndAddInstance(clazz)) as IBindingTest;
+    }
+
+
+    //no bindings, just test startup values
+    [Test]
+    public function testPlainLabel():void
+    {
+
+        var simpleBindings:IBindingTest = createTestInstance(SimpleBindingsA);
+
+        //initial value should be '' for the Label
+        //in flex this is null for Spark Label and '' for mx Label
+        //using mx Label as 'expected' emulation ....
+        assertEquals(simpleBindings.getBindingResultValue(0), '', 'Bad initial value in simple binding');
+
+
+    }
+
+
+    [Test]
+    public function testSimpleBindings():void
+    {
+        var simpleBindings:IBindingTest = createTestInstance(SimpleBindingsA);
+
+        //simpleBindings.labelText = 'testSimpleBindings';
+        simpleBindings.setInboundValue('testSimpleBindings', 0);
+        //simpleBindings.testLabel.text
+        assertEquals(simpleBindings.getBindingResultValue(0), 'testSimpleBindings', 'Bad binding text value in simple binding');
+
+        //simpleBindings.labelText = null;
+        simpleBindings.setInboundValue(null, 0);
+        //in flex this is null for Spark Label and '' for mx Label
+        //using mx Label as 'expected' emulation ....
+        assertEquals(simpleBindings.getBindingResultValue(0), '', 'Bad null inbound value in simple text binding');
+
+        simpleBindings.setInboundValue(undefined, 0);
+        //in flex this is null for Spark Label and '' for mx Label
+        //using mx Label as 'expected' emulation ....
+        assertEquals(simpleBindings.getBindingResultValue(0), '', 'Bad null inbound value in simple text binding');
+
+    }
+
+
+    [Test]
+    public function testSimpleBindingsB():void
+    {
+        var simpleBindings:IBindingTest = createTestInstance(SimpleBindingsB);
+
+        //simpleBindings.labelText = 'testSimpleBindings';
+        simpleBindings.setInboundValue('setStringValue', 0);
+        //simpleBindings.testLabel.text
+        assertEquals(simpleBindings.getBindingResultValue(0), 'setStringValue', 'Bad binding text value in simple binding');
+        assertEquals(simpleBindings.getBindingResultValue(1), 'setStringValue', 'Bad binding Object target value in simple binding');
+
+
+        //this is not really a Binding test, more a mxml codgen  test, there were errors before a compiler fix:
+        assertEquals(simpleBindings.getBindingResultValue(2), 'test', 'Bad codegen for fx:Object tag');
+
+        simpleBindings.setInboundValue('testval', 2);
+        assertEquals(simpleBindings.getBindingResultValue(2), 'testval', 'Bad codegen for fx:Object tag');
+        simpleBindings.setInboundValue('testval', 3);
+        assertEquals(simpleBindings.getBindingResultValue(3), 'testval', 'Bad codegen for fx:Object tag');
+
+
+        simpleBindings.setInboundValue(99, 4);
+        assertStrictlyEquals(simpleBindings.getBindingResultValue(4), 99, 'Bad binding numeric value in simple binding');
+        simpleBindings.setInboundValue(99, 5);
+        assertStrictlyEquals(simpleBindings.getBindingResultValue(5), '99', 'Bad binding text value in simple binding');
+
+
+        simpleBindings.setInboundValue(99, 6);
+        assertStrictlyEquals(simpleBindings.getBindingResultValue(6), 99, 'Bad binding numeric value in simple binding');
+
+        simpleBindings.setInboundValue(99, 7);
+        assertStrictlyEquals(simpleBindings.getBindingResultValue(7), 99, 'Bad binding numeric value in simple binding');
+
+    }
+
+
+
+
+    [Test]
+    public function testDeepBindingsA():void
+    {
+        var deepBindings:IBindingTest = createTestInstance(DeepBindingsA);
+
+        deepBindings.setInboundValue('setStringValue', 0);
+        //deepBindings.testLabel.text
+        assertEquals(deepBindings.getBindingResultValue(0), 'setStringValue', 'Bad binding text value in simple binding');
+        assertEquals(deepBindings.getBindingResultValue(1), 'setStringValue', 'Bad binding Object target value in simple binding');
+
+        deepBindings.setInboundValue(99, 2);
+        assertStrictlyEquals(deepBindings.getBindingResultValue(2), 99, 'Bad binding numeric value in simple binding');
+        deepBindings.setInboundValue(99, 3);
+        assertStrictlyEquals(deepBindings.getBindingResultValue(3), '99', 'Bad binding text value in simple binding');
+
+
+        deepBindings.setInboundValue(99, 4);
+        assertStrictlyEquals(deepBindings.getBindingResultValue(4), 99, 'Bad binding numeric value in simple binding');
+
+
+    }
+
+    [Test]
+    public function testFunctionBindingsA():void
+    {
+        var funcBindings:IBindingTest = createTestInstance(FunctionBindingsA);
+
+        //check startup values for all
+        assertEquals(funcBindings.getBindingResultValue(0), 'Internally false', 'Bad binding text value in function binding');
+        assertEquals(funcBindings.getBindingResultValue(1), 'Internally false', 'Bad binding Object target value in function binding');
+
+        assertEquals(funcBindings.getBindingResultValue(2), 'Inbound only', 'Bad binding text value in function binding');
+        assertEquals(funcBindings.getBindingResultValue(3), 'Inbound only', 'Bad binding Object target value in function binding');
+
+        assertEquals(funcBindings.getBindingResultValue(4), 'Internally false', 'Bad binding text value in function binding');
+        assertEquals(funcBindings.getBindingResultValue(5), 'Internally false', 'Bad binding Object target value in function binding');
+
+        assertEquals(funcBindings.getBindingResultValue(6), 'Inbound only', 'Bad binding text value in function binding');
+        assertEquals(funcBindings.getBindingResultValue(7), 'Inbound only', 'Bad binding Object target value in function binding');
+
+        funcBindings.setInboundValue(true,8); //changes:
+        assertEquals(funcBindings.getBindingResultValue(8), 'Internally false', 'Bad binding text value in function binding');
+        assertEquals(funcBindings.getBindingResultValue(9), 'Internally false', 'Bad binding Object target value in function binding');
+
+        funcBindings.setInboundValue(true,10);
+
+        assertEquals(funcBindings.getBindingResultValue(10), "Both are true", 'Bad binding text value in function binding');
+        assertEquals(funcBindings.getBindingResultValue(11), "Both are true", 'Bad binding Object target value in function binding');
+
+        //bindable2.bindableOne.toggle = value;
+        funcBindings.setInboundValue(true,12);
+
+        assertEquals(funcBindings.getBindingResultValue(12), 'Internally false', 'Bad binding text value in function binding');
+        funcBindings.setInboundValue(true,13);
+        assertEquals(funcBindings.getBindingResultValue(13), 'Internally false', 'Bad binding Object target value in function binding');
+        funcBindings.setInboundValue(false,13);
+        assertEquals(funcBindings.getBindingResultValue(13), 'Internally false', 'Bad binding Object target value in function binding');
+
+        funcBindings.setInboundValue(true,14);
+        assertEquals(funcBindings.getBindingResultValue(14), 'Internally false', 'Bad binding Object target value in function binding');
+
+        funcBindings.setInboundValue(false,14);
+        assertEquals(funcBindings.getBindingResultValue(14), 'Internally false', 'Bad binding Object target value in function binding');
+
+        funcBindings.setInboundValue(true,15);
+        assertEquals(funcBindings.getBindingResultValue(15), 'Internally false', 'Bad binding Object target value in function binding');
+
+        funcBindings.setInboundValue(false,15);
+        assertEquals(funcBindings.getBindingResultValue(15), 'Internally false', 'Bad binding Object target value in function binding');
+
+
+        funcBindings.setInboundValue(true,16);
+        assertEquals(funcBindings.getBindingResultValue(16), "Inbound only", 'Bad binding Object target value in function binding');
+
+        funcBindings.setInboundValue(false,16);
+        assertEquals(funcBindings.getBindingResultValue(16), "Inbound only", 'Bad binding Object target value in function binding');
+
+
+        funcBindings.setInboundValue(true,17);
+        assertEquals(funcBindings.getBindingResultValue(17), "Both are true", 'Bad binding Object target value in function binding');
+
+        funcBindings.setInboundValue(false,17);
+        assertEquals(funcBindings.getBindingResultValue(17), "Inbound only", 'Bad binding Object target value in function binding');
+
+    }
+
+
+}
+}