예제 #1
0
 void Ex03()
 {
     When("the property1 binds the property2 with a converter", () => Property1.Bind(Property2, value => value.ToString()));
     When("the property1 binds another property with a converter", () => Property1.Bind(ObservableProperty <int> .Of(7), value => value.ToString()));
     Then <InvalidOperationException>($"{typeof(InvalidOperationException)} should be thrown");
 }
예제 #2
0
        public ObservablePropertySpec_Binding_OneWayWithConverter()
        {
            Property1 = ObservableProperty <string> .Of("Test1");

            Property2 = ObservableProperty <int> .Of(3);
        }
 void Ex02() => Expect("the value of the property should be the specified value", () => ObservableProperty <string> .Of("Test").Value == "Test");
 void Ex04()
 {
     When("the property1 binds the property2 as two way binding", () => Property1.BindTwoWay(Property2));
     When("the property1 binds another property as two way binding", () => Property1.BindTwoWay(ObservableProperty <string> .Of("Test")));
     Then <InvalidOperationException>($"{typeof(InvalidOperationException)} should be thrown");
 }
        public ObservablePropertySpec_Binding_TwoWay()
        {
            Property1 = ObservableProperty <string> .Of("Test1");

            Property2 = ObservableProperty <string> .Of("Test2");
        }
 void Ex03()
 {
     When("the property1 binds the property2 as two way binding with converters", () => Property1.BindTwoWay(Property2, value => value.ToString(), int.Parse));
     When("the property1 binds another property as two way binding with converters", () => Property1.BindTwoWay(ObservableProperty <int> .Of(8), value => value.ToString(), int.Parse));
     Then <InvalidOperationException>($"{typeof(InvalidOperationException)} should be thrown");
 }