From 74ab31b44bd3728b60c532362ae9d719244de8e2 Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Tue, 30 Jan 2018 21:59:46 +0100 Subject: [PATCH] Fix binding tests --- .../Binding/Binders/MvxSourceStepTests.cs | 3 +-- .../Binding/Bindings/MvxFullBindingConstructionTest.cs | 3 +-- .../Binding/Parse/Binding/MvxBindingTest.cs | 1 - .../Parse/Binding/Swiss/MvxBaseSwissBindingTest.cs | 9 +++++++-- .../Binding/Parse/Binding/Swiss/MvxSwissBindingTest.cs | 8 ++++++-- .../Binding/Parse/Binding/Swiss/MvxTibetBindingTest.cs | 8 ++++++-- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Binders/MvxSourceStepTests.cs b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Binders/MvxSourceStepTests.cs index 44862fa40..894cf62e9 100644 --- a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Binders/MvxSourceStepTests.cs +++ b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Binders/MvxSourceStepTests.cs @@ -209,8 +209,7 @@ namespace MvvmCross.Binding.Test.Binders private MvxSourceStepFactory SetupSourceStepFactory() { - _fixture.Reset(); - _fixture.InitializeSingletonCache(); + _fixture.ClearAll(); var autoValueConverters = new MvxAutoValueConverters(); _fixture.Ioc.RegisterSingleton(autoValueConverters); diff --git a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingConstructionTest.cs b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingConstructionTest.cs index f7f65f644..593aadac3 100644 --- a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingConstructionTest.cs +++ b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingConstructionTest.cs @@ -80,8 +80,7 @@ namespace MvvmCross.Binding.Test.Bindings private void TestCommon(MvxBindingMode bindingMode, bool expectSourceBinding, bool expectTargetBinding) { - _fixture.InitializeSingletonCache(); - _fixture.Reset(); + _fixture.ClearAll(); _fixture.Ioc.RegisterSingleton(new InlineMockMainThreadDispatcher()); var mockSourceBindingFactory = new Mock(); diff --git a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/MvxBindingTest.cs b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/MvxBindingTest.cs index bc1ab99cd..9ba8f37f7 100644 --- a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/MvxBindingTest.cs +++ b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/MvxBindingTest.cs @@ -8,7 +8,6 @@ using Xunit; namespace MvvmCross.Binding.Test.Parse.Binding { - [Collection("MvxTest")] public abstract class MvxBindingTest : IClassFixture { public MvxBindingTest(MvxTestFixture fixture) diff --git a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxBaseSwissBindingTest.cs b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxBaseSwissBindingTest.cs index ffc599117..f726abbf3 100644 --- a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxBaseSwissBindingTest.cs +++ b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxBaseSwissBindingTest.cs @@ -9,15 +9,20 @@ using System.Text; using MvvmCross.Binding.Parse.Binding; using MvvmCross.Binding.Parse.Binding.Swiss; using MvvmCross.Platform.Logging; -using MvvmCross.Platform.Platform; +using MvvmCross.Test; using Xunit; namespace MvvmCross.Binding.Test.Parse.Binding.Swiss { - public class MvxBaseSwissBindingTest + public abstract class MvxBaseSwissBindingTest : MvxBindingTest where TParser : MvxSwissBindingParser, new() { + public MvxBaseSwissBindingTest(MvxTestFixture fixture) : base(fixture) + { + + } + [Fact] public void TestPathBinding() { diff --git a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxSwissBindingTest.cs b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxSwissBindingTest.cs index a5036df15..34105eab7 100644 --- a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxSwissBindingTest.cs +++ b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxSwissBindingTest.cs @@ -5,15 +5,19 @@ using MvvmCross.Binding.Parse.Binding; using MvvmCross.Binding.Parse.Binding.Swiss; using MvvmCross.Platform.Logging; -using MvvmCross.Platform.Platform; +using MvvmCross.Test; using Xunit; namespace MvvmCross.Binding.Test.Parse.Binding.Swiss { - + [Collection("MvxTest")] public class MvxSwissBindingTest : MvxBaseSwissBindingTest { + public MvxSwissBindingTest(MvxTestFixture fixture) : base(fixture) + { + } + [Fact] public void TestFunctionalValueConverterBinding() { diff --git a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxTibetBindingTest.cs b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxTibetBindingTest.cs index 3a11404ae..f82e61ea4 100644 --- a/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxTibetBindingTest.cs +++ b/MvvmCross.Tests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxTibetBindingTest.cs @@ -6,15 +6,19 @@ using System.Collections.Generic; using MvvmCross.Binding.Parse.Binding; using MvvmCross.Binding.Parse.Binding.Tibet; using MvvmCross.Platform.Logging; -using MvvmCross.Platform.Platform; +using MvvmCross.Test; using Xunit; namespace MvvmCross.Binding.Test.Parse.Binding.Swiss { - + [Collection("MvxTest")] public class MvxTibetBindingTest : MvxBaseSwissBindingTest { + public MvxTibetBindingTest(MvxTestFixture fixture) : base(fixture) + { + } + [Fact] public void TestFunctionalValueConverterBinding() {