|
|
|
@ -21,7 +21,6 @@ namespace Avalonia.Base.UnitTests |
|
|
|
public void Constructor_Should_Set_Value_Based_On_Initial_Entry() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>( |
|
|
|
Owner, |
|
|
|
TestProperty, |
|
|
|
NullSink, |
|
|
|
new ConstantValueEntry<string>(TestProperty, "1", BindingPriority.StyleTrigger)); |
|
|
|
@ -34,7 +33,6 @@ namespace Avalonia.Base.UnitTests |
|
|
|
public void SetValue_LocalValue_Should_Not_Add_Entries() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>( |
|
|
|
Owner, |
|
|
|
TestProperty, |
|
|
|
NullSink); |
|
|
|
|
|
|
|
@ -48,7 +46,6 @@ namespace Avalonia.Base.UnitTests |
|
|
|
public void SetValue_Non_LocalValue_Should_Add_Entries() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>( |
|
|
|
Owner, |
|
|
|
TestProperty, |
|
|
|
NullSink); |
|
|
|
|
|
|
|
@ -66,7 +63,7 @@ namespace Avalonia.Base.UnitTests |
|
|
|
[Fact] |
|
|
|
public void Binding_With_Same_Priority_Should_Be_Appended() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>(Owner, TestProperty, NullSink); |
|
|
|
var target = new PriorityValue<string>(TestProperty, NullSink); |
|
|
|
var source1 = new Source("1"); |
|
|
|
var source2 = new Source("2"); |
|
|
|
|
|
|
|
@ -86,7 +83,7 @@ namespace Avalonia.Base.UnitTests |
|
|
|
[Fact] |
|
|
|
public void Binding_With_Higher_Priority_Should_Be_Appended() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>(Owner, TestProperty, NullSink); |
|
|
|
var target = new PriorityValue<string>(TestProperty, NullSink); |
|
|
|
var source1 = new Source("1"); |
|
|
|
var source2 = new Source("2"); |
|
|
|
|
|
|
|
@ -106,7 +103,7 @@ namespace Avalonia.Base.UnitTests |
|
|
|
[Fact] |
|
|
|
public void Binding_With_Lower_Priority_Should_Be_Prepended() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>(Owner, TestProperty, NullSink); |
|
|
|
var target = new PriorityValue<string>(TestProperty, NullSink); |
|
|
|
var source1 = new Source("1"); |
|
|
|
var source2 = new Source("2"); |
|
|
|
|
|
|
|
@ -126,7 +123,7 @@ namespace Avalonia.Base.UnitTests |
|
|
|
[Fact] |
|
|
|
public void Second_Binding_With_Lower_Priority_Should_Be_Inserted_In_Middle() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>(Owner, TestProperty, NullSink); |
|
|
|
var target = new PriorityValue<string>(TestProperty, NullSink); |
|
|
|
var source1 = new Source("1"); |
|
|
|
var source2 = new Source("2"); |
|
|
|
var source3 = new Source("3"); |
|
|
|
@ -148,7 +145,7 @@ namespace Avalonia.Base.UnitTests |
|
|
|
[Fact] |
|
|
|
public void Competed_Binding_Should_Be_Removed() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>(Owner, TestProperty, NullSink); |
|
|
|
var target = new PriorityValue<string>(TestProperty, NullSink); |
|
|
|
var source1 = new Source("1"); |
|
|
|
var source2 = new Source("2"); |
|
|
|
var source3 = new Source("3"); |
|
|
|
@ -171,7 +168,7 @@ namespace Avalonia.Base.UnitTests |
|
|
|
[Fact] |
|
|
|
public void Value_Should_Come_From_Last_Entry() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>(Owner, TestProperty, NullSink); |
|
|
|
var target = new PriorityValue<string>(TestProperty, NullSink); |
|
|
|
var source1 = new Source("1"); |
|
|
|
var source2 = new Source("2"); |
|
|
|
var source3 = new Source("3"); |
|
|
|
@ -186,7 +183,7 @@ namespace Avalonia.Base.UnitTests |
|
|
|
[Fact] |
|
|
|
public void LocalValue_Should_Override_LocalValue_Binding() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>(Owner, TestProperty, NullSink); |
|
|
|
var target = new PriorityValue<string>(TestProperty, NullSink); |
|
|
|
var source1 = new Source("1"); |
|
|
|
|
|
|
|
target.AddBinding(source1, BindingPriority.LocalValue).Start(); |
|
|
|
@ -198,7 +195,7 @@ namespace Avalonia.Base.UnitTests |
|
|
|
[Fact] |
|
|
|
public void LocalValue_Should_Override_Style_Binding() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>(Owner, TestProperty, NullSink); |
|
|
|
var target = new PriorityValue<string>(TestProperty, NullSink); |
|
|
|
var source1 = new Source("1"); |
|
|
|
|
|
|
|
target.AddBinding(source1, BindingPriority.Style).Start(); |
|
|
|
@ -210,7 +207,7 @@ namespace Avalonia.Base.UnitTests |
|
|
|
[Fact] |
|
|
|
public void LocalValue_Should_Not_Override_Animation_Binding() |
|
|
|
{ |
|
|
|
var target = new PriorityValue<string>(Owner, TestProperty, NullSink); |
|
|
|
var target = new PriorityValue<string>(TestProperty, NullSink); |
|
|
|
var source1 = new Source("1"); |
|
|
|
|
|
|
|
target.AddBinding(source1, BindingPriority.Animation).Start(); |
|
|
|
|