Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<ItemGroup>
<PackageVersion Include="PolySharp" Version="1.14.1" />
<PackageVersion Include="Prism.Container.Abstractions" Version="9.0.107" />
<PackageVersion Include="Prism.Container.DryIoc" Version="9.0.107" />
<PackageVersion Include="Prism.Container.Unity" Version="9.0.107" />
<PackageVersion Include="Prism.Container.Abstractions" Version="9.0.114" />
<PackageVersion Include="Prism.Container.DryIoc" Version="9.0.114" />
<PackageVersion Include="Prism.Container.Unity" Version="9.0.114" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="System.Reactive" Version="6.0.1" />
<PackageVersion Include="Xamarin.Forms" Version="5.0.0.2401" />
Expand Down
2 changes: 1 addition & 1 deletion PrismLibrary_Wpf.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
"tests\\Wpf\\Prism.Wpf.Tests\\Prism.Wpf.Tests.csproj"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Prism.Navigation.Regions;
using Prism.Navigation.Regions.Behaviors;
using Prism.Wpf.Tests.Mocks;
Expand Down Expand Up @@ -42,8 +38,8 @@ public void RegionWillNotGetCreatedTwiceWhenThereAreMoreRegions()
var adapter = new MockRegionAdapter();
adapter.Accessor = accessor;

var behavior1 = this.GetBehavior(control1, accessor, adapter);
var behavior2 = this.GetBehavior(control2, accessor, adapter);
var behavior1 = GetBehavior(control1, accessor, adapter);
var behavior2 = GetBehavior(control2, accessor, adapter);

behavior1.Attach();
behavior2.Attach();
Expand All @@ -68,9 +64,9 @@ public void RegionGetsCreatedWhenAccessingRegions()
GetRegionName = d => "myRegionName"
};

var behavior1 = this.GetBehavior(control1, accessor);
var behavior1 = GetBehavior(control1, accessor);
behavior1.Attach();
var behavior2 = this.GetBehavior(control2, accessor);
var behavior2 = GetBehavior(control2, accessor);
behavior2.Attach();

accessor.UpdateRegions();
Expand All @@ -91,7 +87,7 @@ public void RegionDoesNotGetCreatedTwiceWhenUpdatingRegions()
GetRegionName = d => "myRegionName"
};

var behavior = this.GetBehavior(control, accessor);
var behavior = GetBehavior(control, accessor);
behavior.Attach();
accessor.UpdateRegions();
IRegion region = RegionManager.GetObservableRegion(control).Value;
Expand All @@ -112,7 +108,7 @@ public async Task BehaviorDoesNotPreventControlFromBeingGarbageCollected()
GetRegionName = d => "myRegionName"
};

var behavior = this.GetBehavior(control, accessor);
var behavior = GetBehavior(control, accessor);
behavior.Attach();

Assert.True(controlWeakReference.IsAlive);
Expand All @@ -136,7 +132,7 @@ public async Task BehaviorDoesNotPreventControlFromBeingGarbageCollectedWhenRegi
GetRegionName = d => "myRegionName"
};

var behavior = this.GetBehavior(control, accessor);
var behavior = GetBehavior(control, accessor);
behavior.Attach();
accessor.UpdateRegions();

Expand All @@ -159,7 +155,7 @@ public void BehaviorShouldUnhookEventWhenDetaching()
{
GetRegionName = d => "myRegionName",
};
var behavior = this.GetBehavior(control, accessor);
var behavior = GetBehavior(control, accessor);
behavior.Attach();

int startingCount = accessor.GetSubscribersCount();
Expand All @@ -169,7 +165,7 @@ public void BehaviorShouldUnhookEventWhenDetaching()
Assert.Equal<int>(startingCount - 1, accessor.GetSubscribersCount());
}

[StaFact]
[StaFact()]
public void ShouldCleanupBehaviorOnceRegionIsCreated()
{
var control = new MockFrameworkElement();
Expand All @@ -180,7 +176,7 @@ public void ShouldCleanupBehaviorOnceRegionIsCreated()
GetRegionName = d => "myRegionName"
};

var behavior = this.GetBehavior(control, accessor);
var behavior = GetBehavior(control, accessor);
WeakReference behaviorWeakReference = new WeakReference(behavior);
behavior.Attach();
accessor.UpdateRegions();
Expand All @@ -192,7 +188,7 @@ public void ShouldCleanupBehaviorOnceRegionIsCreated()

Assert.False(behaviorWeakReference.IsAlive);

var behavior2 = this.GetBehavior(control2, accessor);
var behavior2 = GetBehavior(control2, accessor);
WeakReference behaviorWeakReference2 = new WeakReference(behavior2);
behavior2.Attach();
accessor.UpdateRegions();
Expand Down
Loading