public void CheckValidDataSource_emptyMappingName () { StylePoker p = new StylePoker (); string[] arr = new string[] { "hi", "bye" }; BindingContext bc = new BindingContext (); p.DoCheckValidDataSource ((CurrencyManager)bc[arr]); }
public void CheckValidDataSource_emptyMappingName() { StylePoker p = new StylePoker(); string[] arr = new string[] { "hi", "bye" }; BindingContext bc = new BindingContext(); p.DoCheckValidDataSource((CurrencyManager)bc[arr]); }
public void TestReadOnly() { StylePoker p = new StylePoker(); Assert.IsFalse(p.ReadOnly, "1"); p.ReadOnly = true; Assert.IsTrue(p.ReadOnly, "2"); p.ReadOnly = false; DataGridTableStyle ts = new DataGridTableStyle(); ts.GridColumnStyles.Add(p); ts.ReadOnly = true; Assert.IsFalse(p.ReadOnly, "3"); }
public void TestReadOnly_PropertyDescriptorSet() { /* check the effect the PropertyDescriptor setter has on the property */ PropertyDescriptor ro_prop = TypeDescriptor.GetProperties(typeof(ReadOnlyPropertyTest))["ROProp"]; PropertyDescriptor rw_prop = TypeDescriptor.GetProperties(typeof(ReadOnlyPropertyTest))["RWProp"]; StylePoker p; /* non-user set, readonly property */ p = new StylePoker(); Assert.IsFalse(p.ReadOnly, "a1"); p.PropertyDescriptor = ro_prop; Assert.IsFalse(p.ReadOnly, "a2"); /* non-user set, non-readonly property */ p = new StylePoker(); Assert.IsFalse(p.ReadOnly, "b1"); p.PropertyDescriptor = rw_prop; Assert.IsFalse(p.ReadOnly, "b2"); /* user set to false, readonly property */ p = new StylePoker(); p.ReadOnly = false; p.PropertyDescriptor = ro_prop; Assert.IsFalse(p.ReadOnly, "c1"); /* user set to false, non-readonly property */ p = new StylePoker(); p.ReadOnly = false; p.PropertyDescriptor = rw_prop; Assert.IsFalse(p.ReadOnly, "d1"); /* user set to true, readonly property */ p = new StylePoker(); p.ReadOnly = true; p.PropertyDescriptor = ro_prop; Assert.IsTrue(p.ReadOnly, "e1"); /* user set to true, non-readonly property */ p = new StylePoker(); p.ReadOnly = true; p.PropertyDescriptor = rw_prop; Assert.IsTrue(p.ReadOnly, "f1"); }
public void CheckValidDataSource_nullSource() { StylePoker p = new StylePoker(); p.DoCheckValidDataSource(null); }
public void CheckValidDataSource_nullSource () { StylePoker p = new StylePoker (); p.DoCheckValidDataSource (null); }
public void TestReadOnly_PropertyDescriptorSet () { /* check the effect the PropertyDescriptor setter has on the property */ PropertyDescriptor ro_prop = TypeDescriptor.GetProperties(typeof (ReadOnlyPropertyTest))["ROProp"]; PropertyDescriptor rw_prop = TypeDescriptor.GetProperties(typeof (ReadOnlyPropertyTest))["RWProp"]; StylePoker p; /* non-user set, readonly property */ p = new StylePoker (); Assert.IsFalse (p.ReadOnly, "a1"); p.PropertyDescriptor = ro_prop; Assert.IsFalse (p.ReadOnly, "a2"); /* non-user set, non-readonly property */ p = new StylePoker (); Assert.IsFalse (p.ReadOnly, "b1"); p.PropertyDescriptor = rw_prop; Assert.IsFalse (p.ReadOnly, "b2"); /* user set to false, readonly property */ p = new StylePoker (); p.ReadOnly = false; p.PropertyDescriptor = ro_prop; Assert.IsFalse (p.ReadOnly, "c1"); /* user set to false, non-readonly property */ p = new StylePoker (); p.ReadOnly = false; p.PropertyDescriptor = rw_prop; Assert.IsFalse (p.ReadOnly, "d1"); /* user set to true, readonly property */ p = new StylePoker (); p.ReadOnly = true; p.PropertyDescriptor = ro_prop; Assert.IsTrue (p.ReadOnly, "e1"); /* user set to true, non-readonly property */ p = new StylePoker (); p.ReadOnly = true; p.PropertyDescriptor = rw_prop; Assert.IsTrue (p.ReadOnly, "f1"); }
public void TestReadOnly () { StylePoker p = new StylePoker (); Assert.IsFalse (p.ReadOnly, "1"); p.ReadOnly = true; Assert.IsTrue (p.ReadOnly, "2"); p.ReadOnly = false; DataGridTableStyle ts = new DataGridTableStyle(); ts.GridColumnStyles.Add (p); ts.ReadOnly = true; Assert.IsFalse (p.ReadOnly, "3"); }