From 5ae3a8c4e01417b08de474afeae8ac913048f666 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Fri, 17 Aug 2012 18:00:16 -0400 Subject: [PATCH] Build fixups to tests --- .../ReactiveUI.Routing.Tests.csproj | 23 +++++++++++++++---- ReactiveUI.Tests/CommandBindingTests.cs | 10 +++++--- ReactiveUI.Tests/PropertyBindingTest.cs | 2 +- ReactiveUI.Tests/ReactiveUI.Tests.csproj | 23 +++++++++++++++---- ReactiveUI.Tests/ReactiveUI.Tests_SL5.csproj | 22 +++++++++--------- 5 files changed, 57 insertions(+), 23 deletions(-) diff --git a/ReactiveUI.Routing.Tests/ReactiveUI.Routing.Tests.csproj b/ReactiveUI.Routing.Tests/ReactiveUI.Routing.Tests.csproj index d4ce094267..589e8356ac 100644 --- a/ReactiveUI.Routing.Tests/ReactiveUI.Routing.Tests.csproj +++ b/ReactiveUI.Routing.Tests/ReactiveUI.Routing.Tests.csproj @@ -31,7 +31,8 @@ 4 - + + False ..\ext\Microsoft.Reactive.Testing.dll @@ -42,10 +43,24 @@ - - ..\ext\System.Reactive.dll + + False + ..\ext\System.Reactive.Core.dll - + + False + ..\ext\System.Reactive.Interfaces.dll + + + False + ..\ext\System.Reactive.Linq.dll + + + False + ..\ext\System.Reactive.PlatformServices.dll + + + False ..\ext\System.Reactive.Windows.Threading.dll diff --git a/ReactiveUI.Tests/CommandBindingTests.cs b/ReactiveUI.Tests/CommandBindingTests.cs index 6d83311112..97c1815877 100644 --- a/ReactiveUI.Tests/CommandBindingTests.cs +++ b/ReactiveUI.Tests/CommandBindingTests.cs @@ -19,7 +19,7 @@ public class CreatesCommandBindingTests public void CommandBinderBindsToButton() { var fixture = new CreatesCommandBindingViaCommandParameter(); - var origCmd = new RoutedCommand(); + var origCmd = new ReactiveAsyncCommand(); var cmd = new ReactiveCommand(); var input = new Button { Command = origCmd, CommandParameter = 42 }; @@ -60,6 +60,7 @@ public void EventBinderBindsToExplicitEvent() Assert.False(wasCalled); } +#if !SILVERLIGHT [Fact] public void EventBinderBindsToImplicitEvent() { @@ -83,17 +84,18 @@ public void EventBinderBindsToImplicitEvent() input.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); Assert.Equal(1, invokeCount); } +#endif } public class CommandBindViewModel : ReactiveObject { - ReactiveCommand _Command1; + public ReactiveCommand _Command1; public ReactiveCommand Command1 { get { return _Command1; } set { this.RaiseAndSetIfChanged(x => x.Command1, value); } } - ReactiveCommand _Command2; + public ReactiveCommand _Command2; public ReactiveCommand Command2 { get { return _Command2; } set { this.RaiseAndSetIfChanged(x => x.Command2, value); } @@ -168,6 +170,7 @@ public void CommandBindByNameWireup() Assert.Null(view.Command1.Command); } +#if !SILVERLIGHT [Fact] public void CommandBindToExplicitEventWireup() { @@ -187,5 +190,6 @@ public void CommandBindToExplicitEventWireup() view.Command2.RaiseEvent(new MouseButtonEventArgs(Mouse.PrimaryDevice, 0, MouseButton.Left) { RoutedEvent = Image.MouseUpEvent }); Assert.Equal(1, invokeCount); } +#endif } } diff --git a/ReactiveUI.Tests/PropertyBindingTest.cs b/ReactiveUI.Tests/PropertyBindingTest.cs index a6fa20db11..58539143e2 100644 --- a/ReactiveUI.Tests/PropertyBindingTest.cs +++ b/ReactiveUI.Tests/PropertyBindingTest.cs @@ -10,7 +10,7 @@ namespace ReactiveUI.Tests { public class PropertyBindViewModel : ReactiveObject { - string _Property1; + public string _Property1; public string Property1 { get { return _Property1; } set { this.RaiseAndSetIfChanged(x => x.Property1, value); } diff --git a/ReactiveUI.Tests/ReactiveUI.Tests.csproj b/ReactiveUI.Tests/ReactiveUI.Tests.csproj index ff1dcf0c39..3fb7dc4e62 100644 --- a/ReactiveUI.Tests/ReactiveUI.Tests.csproj +++ b/ReactiveUI.Tests/ReactiveUI.Tests.csproj @@ -42,7 +42,8 @@ - + + False ..\ext\Microsoft.Reactive.Testing.dll @@ -55,10 +56,24 @@ 3.5 - - ..\ext\System.Reactive.dll + + False + ..\ext\System.Reactive.Core.dll - + + False + ..\ext\System.Reactive.Interfaces.dll + + + False + ..\ext\System.Reactive.Linq.dll + + + False + ..\ext\System.Reactive.PlatformServices.dll + + + False ..\ext\System.Reactive.Windows.Threading.dll diff --git a/ReactiveUI.Tests/ReactiveUI.Tests_SL5.csproj b/ReactiveUI.Tests/ReactiveUI.Tests_SL5.csproj index c430275c22..2d4cf4f59a 100644 --- a/ReactiveUI.Tests/ReactiveUI.Tests_SL5.csproj +++ b/ReactiveUI.Tests/ReactiveUI.Tests_SL5.csproj @@ -73,9 +73,7 @@ 4 - - ..\ext\SL5\Microsoft.Reactive.Testing.dll - + ..\ext\SL5\Microsoft.Silverlight.Testing.dll @@ -83,12 +81,11 @@ ..\ext\SL5\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll - - ..\ext\SL5\System.Reactive.dll - - - ..\ext\SL5\System.Reactive.Windows.Threading.dll - + + + + + @@ -113,12 +110,15 @@ App.xaml - + + + + @@ -167,4 +167,4 @@ - + \ No newline at end of file