From e5f9b37b1f5308201755e4ddf5a1ad82bb67f976 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 30 Jan 2016 12:27:40 +0100 Subject: [PATCH] Removed commented-out tests. They have been moved to other files. --- .../PerspexPropertyTests.cs | 94 ++----------------- 1 file changed, 7 insertions(+), 87 deletions(-) diff --git a/tests/Perspex.Base.UnitTests/PerspexPropertyTests.cs b/tests/Perspex.Base.UnitTests/PerspexPropertyTests.cs index 2074f2d585..9327f3da76 100644 --- a/tests/Perspex.Base.UnitTests/PerspexPropertyTests.cs +++ b/tests/Perspex.Base.UnitTests/PerspexPropertyTests.cs @@ -108,18 +108,6 @@ namespace Perspex.Base.UnitTests Assert.Equal("newvalue", value); } - ////[Fact] - ////public void IsDirect_Property_Set_On_Direct_PerspexProperty() - ////{ - //// PerspexProperty target = new PerspexProperty( - //// "test", - //// typeof(Class1), - //// o => null, - //// (o, v) => { }); - - //// Assert.True(target.IsDirect); - ////} - [Fact] public void Property_Equals_Should_Handle_Null() { @@ -133,81 +121,13 @@ namespace Perspex.Base.UnitTests Assert.True((PerspexProperty)null == (PerspexProperty)null); } - ////[Fact] - ////public void AddOwnered_Property_Should_Equal_Original() - ////{ - //// var p1 = new PerspexProperty("p1", typeof(Class1)); - //// var p2 = p1.AddOwner(); - - //// Assert.Equal(p1, p2); - //// Assert.Equal(p1.GetHashCode(), p2.GetHashCode()); - //// Assert.True(p1 == p2); - ////} - - ////[Fact] - ////public void AddOwnered_Property_Should_Have_OwnerType_Set() - ////{ - //// var p1 = new PerspexProperty("p1", typeof(Class1)); - //// var p2 = p1.AddOwner(); - - //// Assert.Equal(typeof(Class3), p2.OwnerType); - ////} - - ////[Fact] - ////public void AddOwnered_Properties_Should_Share_Observables() - ////{ - //// var p1 = new PerspexProperty("p1", typeof(Class1)); - //// var p2 = p1.AddOwner(); - - //// Assert.Same(p1.Changed, p2.Changed); - //// Assert.Same(p1.Initialized, p2.Initialized); - ////} - - ////[Fact] - ////public void AddOwnered_Direct_Property_Should_Equal_Original() - ////{ - //// var p1 = new PerspexProperty("d1", typeof(Class1), o => null, (o,v) => { }); - //// var p2 = p1.AddOwner(o => null, (o, v) => { }); - - //// Assert.Equal(p1, p2); - //// Assert.Equal(p1.GetHashCode(), p2.GetHashCode()); - //// Assert.True(p1 == p2); - ////} - - ////[Fact] - ////public void AddOwnered_Direct_Property_Should_Have_OwnerType_Set() - ////{ - //// var p1 = new PerspexProperty("d1", typeof(Class1), o => null, (o, v) => { }); - //// var p2 = p1.AddOwner(o => null, (o, v) => { }); - - //// Assert.Equal(typeof(Class3), p2.OwnerType); - ////} - - ////[Fact] - ////public void AddOwnered_Direct_Properties_Should_Share_Observables() - ////{ - //// var p1 = new PerspexProperty("d1", typeof(Class1), o => null, (o, v) => { }); - //// var p2 = p1.AddOwner(o => null, (o, v) => { }); - - //// Assert.Same(p1.Changed, p2.Changed); - //// Assert.Same(p1.Initialized, p2.Initialized); - ////} - - ////[Fact] - ////public void AddOwner_With_Getter_And_Setter_On_Standard_Property_Should_Throw() - ////{ - //// var p1 = new PerspexProperty("p1", typeof(Class1)); - - //// Assert.Throws(() => p1.AddOwner(o => null, (o, v) => { })); - ////} - - ////[Fact] - ////public void AddOwner_On_Direct_Property_Without_Getter_Or_Setter_Should_Throw() - ////{ - //// var p1 = new PerspexProperty("e1", typeof(Class1), o => null, (o, v) => { }); - - //// Assert.Throws(() => p1.AddOwner()); - ////} + [Fact] + public void PropertyMetadata_BindingMode_Default_Returns_OneWay() + { + var data = new PropertyMetadata(defaultBindingMode: BindingMode.Default); + + Assert.Equal(BindingMode.OneWay, data.DefaultBindingMode); + } private class TestProperty : PerspexProperty {