Skip to content

Commit

Permalink
Build fixups to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anaisbetts committed Aug 17, 2012
1 parent 56d22d3 commit 5ae3a8c
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 23 deletions.
23 changes: 19 additions & 4 deletions ReactiveUI.Routing.Tests/ReactiveUI.Routing.Tests.csproj
Expand Up @@ -31,7 +31,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Reactive.Testing">
<Reference Include="Microsoft.Reactive.Testing, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\Microsoft.Reactive.Testing.dll</HintPath>
</Reference>
<Reference Include="NLog">
Expand All @@ -42,10 +43,24 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Reactive">
<HintPath>..\ext\System.Reactive.dll</HintPath>
<Reference Include="System.Reactive.Core, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.Core.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Windows.Threading">
<Reference Include="System.Reactive.Interfaces, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.Interfaces.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Linq, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.PlatformServices, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Windows.Threading, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.Windows.Threading.dll</HintPath>
</Reference>
<Reference Include="System.Xaml" />
Expand Down
10 changes: 7 additions & 3 deletions ReactiveUI.Tests/CommandBindingTests.cs
Expand Up @@ -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 };

Expand Down Expand Up @@ -60,6 +60,7 @@ public void EventBinderBindsToExplicitEvent()
Assert.False(wasCalled);
}

#if !SILVERLIGHT
[Fact]
public void EventBinderBindsToImplicitEvent()
{
Expand All @@ -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); }
Expand Down Expand Up @@ -168,6 +170,7 @@ public void CommandBindByNameWireup()
Assert.Null(view.Command1.Command);
}

#if !SILVERLIGHT
[Fact]
public void CommandBindToExplicitEventWireup()
{
Expand All @@ -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
}
}
2 changes: 1 addition & 1 deletion ReactiveUI.Tests/PropertyBindingTest.cs
Expand Up @@ -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); }
Expand Down
23 changes: 19 additions & 4 deletions ReactiveUI.Tests/ReactiveUI.Tests.csproj
Expand Up @@ -42,7 +42,8 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Reactive.Testing">
<Reference Include="Microsoft.Reactive.Testing, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\Microsoft.Reactive.Testing.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
Expand All @@ -55,10 +56,24 @@
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Reactive">
<HintPath>..\ext\System.Reactive.dll</HintPath>
<Reference Include="System.Reactive.Core, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.Core.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Windows.Threading">
<Reference Include="System.Reactive.Interfaces, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.Interfaces.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Linq, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.PlatformServices, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Windows.Threading, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ext\System.Reactive.Windows.Threading.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
Expand Down
22 changes: 11 additions & 11 deletions ReactiveUI.Tests/ReactiveUI.Tests_SL5.csproj
Expand Up @@ -73,22 +73,19 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Reactive.Testing">
<HintPath>..\ext\SL5\Microsoft.Reactive.Testing.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Reactive.Testing, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Silverlight.Testing">
<HintPath>..\ext\SL5\Microsoft.Silverlight.Testing.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight">
<HintPath>..\ext\SL5\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations, Version=5.0.5.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217, processorArchitecture=MSIL" />
<Reference Include="System.Reactive">
<HintPath>..\ext\SL5\System.Reactive.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Windows.Threading">
<HintPath>..\ext\SL5\System.Reactive.Windows.Threading.dll</HintPath>
</Reference>
<Reference Include="System.Reactive.Core, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Reactive.Interfaces, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Reactive.Linq, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Reactive.PlatformServices, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Reactive.Windows.Threading, Version=2.0.20814.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization.Json, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.ServiceModel.Web" />
Expand All @@ -113,12 +110,15 @@
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="DependencyObjectMixinTest.cs" />
<Compile Include="CommandBindingTests.cs" />
<Compile Include="DependencyObjectObservableForPropertyTest.cs" />
<Compile Include="MakeObjectReactiveHelperTest.cs" />
<Compile Include="MessageBusTest.cs" />
<Compile Include="ObservableAsPropertyHelperTest.cs" />
<Compile Include="ObservableAsyncMRUCacheTest.cs" />
<Compile Include="ObservedChangedMixinTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PropertyBindingTest.cs" />
<Compile Include="ReactiveCollectionTest.cs" />
<Compile Include="ReactiveCommandTest.cs" />
<Compile Include="ReactiveNotifyPropertyChangedMixinTest.cs" />
Expand Down Expand Up @@ -167,4 +167,4 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
</Project>

0 comments on commit 5ae3a8c

Please sign in to comment.