コード例 #1
0
        public void TestConvert()
        {
            IBindingValueConverter converter = new InverseBooleanValueConverter();

            converter.Convert(true, typeof(bool), null, null, null).ShouldEqual(false);
            converter.Convert(false, typeof(bool), null, null, null).ShouldEqual(true);
        }
コード例 #2
0
        public void TestConvertNotBool()
        {
            IBindingValueConverter converter = new InverseBooleanValueConverter();
            Action action = () => converter.Convert(new object(), typeof(object), null, null, null);

            action.ShouldThrow();
        }
コード例 #3
0
 public void TestConvert()
 {
     IBindingValueConverter converter = new InverseBooleanValueConverter();
     converter.Convert(true, typeof(bool), null, null, null).ShouldEqual(false);
     converter.Convert(false, typeof(bool), null, null, null).ShouldEqual(true);
 }
コード例 #4
0
 public void TestConvertNotBool()
 {
     IBindingValueConverter converter = new InverseBooleanValueConverter();
     Action action = () => converter.Convert(new object(), typeof (object), null, null, null);
     action.ShouldThrow();
 }