|
|
|
@ -49,23 +49,6 @@ namespace Avalonia.Base.UnitTests |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void StyledProperty_Binding_Producing_Value_Should_Throw() |
|
|
|
{ |
|
|
|
var ti = new ThreadingInterface(true); |
|
|
|
using (UnitTestApplication.Start(new TestServices(threadingInterface: ti))) |
|
|
|
{ |
|
|
|
var target = new Class1(); |
|
|
|
|
|
|
|
var source = new BehaviorSubject<string>("foo"); |
|
|
|
|
|
|
|
target.Bind(Class1.StyledProperty, source); |
|
|
|
|
|
|
|
ti.CurrentThreadIsLoopThread = false; |
|
|
|
Assert.Throws<InvalidOperationException>(() => source.OnNext("bar")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void StyledProperty_ClearValue_Should_Throw() |
|
|
|
{ |
|
|
|
@ -124,23 +107,6 @@ namespace Avalonia.Base.UnitTests |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void DirectProperty_Binding_Producing_Value_Should_Throw() |
|
|
|
{ |
|
|
|
var ti = new ThreadingInterface(true); |
|
|
|
using (UnitTestApplication.Start(new TestServices(threadingInterface: ti))) |
|
|
|
{ |
|
|
|
var target = new Class1(); |
|
|
|
|
|
|
|
var source = new BehaviorSubject<string>("foo"); |
|
|
|
|
|
|
|
target.Bind(Class1.DirectProperty, source); |
|
|
|
|
|
|
|
ti.CurrentThreadIsLoopThread = false; |
|
|
|
Assert.Throws<InvalidOperationException>(() => source.OnNext("bar")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void DirectProperty_ClearValue_Should_Throw() |
|
|
|
{ |
|
|
|
|