summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.UnitTests
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2017-03-07 19:56:24 (GMT)
committerGitHub <noreply@github.com>2017-03-07 19:56:24 (GMT)
commite6d5186c8acbf37b877c7ca3c77a378352a3743d (patch)
treed61ca8ea619f7844e9e0a973dbd7bac794e39147 /Xamarin.Forms.Core.UnitTests
parent2b92142ab2a501de71d3572efc0e5deb2b7bae9a (diff)
downloadxamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.zip
xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.gz
xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.bz2
Remove InternalsVisibleTo from Core to XF.Platforms.* (#782)
* Remove InternalsVisibleTo from Core to XF.Platforms.* * Changes per Jason's code review * Move LockableObservableListWrapper to internals namespace * Changes per Stephane's code review * update docs * Touch code to get CI to run tests * Rebase; Update documentation
Diffstat (limited to 'Xamarin.Forms.Core.UnitTests')
-rw-r--r--Xamarin.Forms.Core.UnitTests/BindableObjectUnitTests.cs3
-rw-r--r--Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/BindingUnitTests.cs5
-rw-r--r--Xamarin.Forms.Core.UnitTests/ListViewTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/MasterDetailFormUnitTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs4
-rw-r--r--Xamarin.Forms.Core.UnitTests/NativeBindingTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/NavigationMenuUnitTests.cs3
-rw-r--r--Xamarin.Forms.Core.UnitTests/NavigationModelTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/NavigationProxyTests.cs2
-rw-r--r--Xamarin.Forms.Core.UnitTests/PageTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/PanGestureRecognizerUnitTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/PinchGestureRecognizerTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs18
-rw-r--r--Xamarin.Forms.Core.UnitTests/RelativeLayoutTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/ResourceDictionaryTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/TableModelTests.cs2
-rw-r--r--Xamarin.Forms.Core.UnitTests/TemplatedItemsListTests.cs1
-rw-r--r--Xamarin.Forms.Core.UnitTests/UnitPlatform.cs1
19 files changed, 32 insertions, 17 deletions
diff --git a/Xamarin.Forms.Core.UnitTests/BindableObjectUnitTests.cs b/Xamarin.Forms.Core.UnitTests/BindableObjectUnitTests.cs
index c46f7c0..861d9af 100644
--- a/Xamarin.Forms.Core.UnitTests/BindableObjectUnitTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/BindableObjectUnitTests.cs
@@ -1,6 +1,7 @@
using System;
using System.Globalization;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
@@ -594,7 +595,7 @@ namespace Xamarin.Forms.Core.UnitTests
};
mock.SetValueCore (MockBindable.TextProperty, foo,
- BindableObject.SetValueFlags.ClearOneWayBindings | BindableObject.SetValueFlags.ClearDynamicResource | BindableObject.SetValueFlags.RaiseOnEqual);
+ SetValueFlags.ClearOneWayBindings | SetValueFlags.ClearDynamicResource | SetValueFlags.RaiseOnEqual);
Assert.That (changing, Is.True, "PropertyChanging event did not fire");
Assert.That (changed, Is.True, "PropertyChanged event did not fire");
diff --git a/Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs b/Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs
index 84addb7..71b6dd8 100644
--- a/Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/BindingBaseUnitTests.cs
@@ -4,6 +4,7 @@ using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/BindingUnitTests.cs b/Xamarin.Forms.Core.UnitTests/BindingUnitTests.cs
index 548e4ad..199845e 100644
--- a/Xamarin.Forms.Core.UnitTests/BindingUnitTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/BindingUnitTests.cs
@@ -6,8 +6,9 @@ using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using NUnit.Framework;
-using CategoryAttribute=NUnit.Framework.CategoryAttribute;
-using DescriptionAttribute=NUnit.Framework.DescriptionAttribute;
+using CategoryAttribute = NUnit.Framework.CategoryAttribute;
+using DescriptionAttribute = NUnit.Framework.DescriptionAttribute;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/ListViewTests.cs b/Xamarin.Forms.Core.UnitTests/ListViewTests.cs
index 9b2810e..cea7931 100644
--- a/Xamarin.Forms.Core.UnitTests/ListViewTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/ListViewTests.cs
@@ -7,6 +7,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Input;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/MasterDetailFormUnitTests.cs b/Xamarin.Forms.Core.UnitTests/MasterDetailFormUnitTests.cs
index 8ace2e7..b02e919 100644
--- a/Xamarin.Forms.Core.UnitTests/MasterDetailFormUnitTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/MasterDetailFormUnitTests.cs
@@ -1,6 +1,7 @@
using System;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs b/Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs
index 3d6ddb9..5adf678 100644
--- a/Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs
+++ b/Xamarin.Forms.Core.UnitTests/MockPlatformServices.cs
@@ -149,13 +149,13 @@ namespace Xamarin.Forms.Core.UnitTests
return Task.FromResult (true);
}
- public Task<Stream> OpenFileAsync (string path, FileMode mode, FileAccess access)
+ public Task<Stream> OpenFileAsync (string path, Internals.FileMode mode, Internals.FileAccess access)
{
Stream stream = isolatedStorageFile.OpenFile (path, (System.IO.FileMode)mode, (System.IO.FileAccess)access);
return Task.FromResult (stream);
}
- public Task<Stream> OpenFileAsync (string path, FileMode mode, FileAccess access, FileShare share)
+ public Task<Stream> OpenFileAsync (string path, Internals.FileMode mode, Internals.FileAccess access, Internals.FileShare share)
{
Stream stream = isolatedStorageFile.OpenFile (path, (System.IO.FileMode)mode, (System.IO.FileAccess)access, (System.IO.FileShare)share);
return Task.FromResult (stream);
diff --git a/Xamarin.Forms.Core.UnitTests/NativeBindingTests.cs b/Xamarin.Forms.Core.UnitTests/NativeBindingTests.cs
index c13608d..6c6bd1b 100644
--- a/Xamarin.Forms.Core.UnitTests/NativeBindingTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/NativeBindingTests.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using NUnit.Framework;
using System.ComponentModel;
using System.Globalization;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/NavigationMenuUnitTests.cs b/Xamarin.Forms.Core.UnitTests/NavigationMenuUnitTests.cs
index b91f022..8ed5e73 100644
--- a/Xamarin.Forms.Core.UnitTests/NavigationMenuUnitTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/NavigationMenuUnitTests.cs
@@ -4,6 +4,7 @@ using NUnit.Framework;
using System.Collections.Generic;
using System.Linq;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
@@ -182,7 +183,7 @@ namespace Xamarin.Forms.Core.UnitTests
};
menu.Add (child);
- menu.SendTargetSelected (child);
+ ((INavigationMenuController)menu).SendTargetSelected (child);
Assert.True (pushed);
Assert.AreEqual (child, navForm.CurrentPage);
diff --git a/Xamarin.Forms.Core.UnitTests/NavigationModelTests.cs b/Xamarin.Forms.Core.UnitTests/NavigationModelTests.cs
index ec3aaf5..8173a89 100644
--- a/Xamarin.Forms.Core.UnitTests/NavigationModelTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/NavigationModelTests.cs
@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/NavigationProxyTests.cs b/Xamarin.Forms.Core.UnitTests/NavigationProxyTests.cs
index 459f4cf..7dae5f5 100644
--- a/Xamarin.Forms.Core.UnitTests/NavigationProxyTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/NavigationProxyTests.cs
@@ -2,7 +2,7 @@ using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using System.Threading.Tasks;
-
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/PageTests.cs b/Xamarin.Forms.Core.UnitTests/PageTests.cs
index 74b56d8..b694283 100644
--- a/Xamarin.Forms.Core.UnitTests/PageTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/PageTests.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/PanGestureRecognizerUnitTests.cs b/Xamarin.Forms.Core.UnitTests/PanGestureRecognizerUnitTests.cs
index c0207d6..0d08fc1 100644
--- a/Xamarin.Forms.Core.UnitTests/PanGestureRecognizerUnitTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/PanGestureRecognizerUnitTests.cs
@@ -1,5 +1,6 @@
using System;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/PinchGestureRecognizerTests.cs b/Xamarin.Forms.Core.UnitTests/PinchGestureRecognizerTests.cs
index 3af5503..ecb7014 100644
--- a/Xamarin.Forms.Core.UnitTests/PinchGestureRecognizerTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/PinchGestureRecognizerTests.cs
@@ -1,5 +1,6 @@
using System;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs b/Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs
index 9758eaf..c477f02 100644
--- a/Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs
@@ -29,7 +29,7 @@ namespace Xamarin.Forms.Core.UnitTests
{
base.Setup ();
Device.PlatformServices = new MockPlatformServices ();
- Registrar.RegisterAll (new [] {
+ Internals.Registrar.RegisterAll (new [] {
typeof (TestHandlerAttribute)
});
@@ -45,7 +45,7 @@ namespace Xamarin.Forms.Core.UnitTests
[Test]
public void GetButtonHandler ()
{
- var buttonTarget = Registrar.Registered.GetHandler<ButtonTarget> (typeof (Button));
+ var buttonTarget = Internals.Registrar.Registered.GetHandler<ButtonTarget> (typeof (Button));
Assert.IsNotNull (buttonTarget);
Assert.That (buttonTarget, Is.InstanceOf<ButtonTarget>());
}
@@ -53,7 +53,7 @@ namespace Xamarin.Forms.Core.UnitTests
[Test]
public void GetSliderHandler()
{
- var sliderTarget = Registrar.Registered.GetHandler<SliderTarget> (typeof (Slider));
+ var sliderTarget = Internals.Registrar.Registered.GetHandler<SliderTarget> (typeof (Slider));
Assert.IsNotNull (sliderTarget);
Assert.That (sliderTarget, Is.InstanceOf<SliderTarget> ());
}
@@ -76,7 +76,7 @@ namespace Xamarin.Forms.Core.UnitTests
[Test]
public void TestConstructor ()
{
- var registrar = new Registrar<MockRenderer> ();
+ var registrar = new Internals.Registrar<MockRenderer> ();
var renderer = registrar.GetHandler (typeof (Button));
@@ -86,7 +86,7 @@ namespace Xamarin.Forms.Core.UnitTests
[Test]
public void TestGetRendererForKnownClass ()
{
- var registrar = new Registrar<MockRenderer> ();
+ var registrar = new Internals.Registrar<MockRenderer> ();
registrar.Register (typeof(View), typeof(MockRenderer));
@@ -98,7 +98,7 @@ namespace Xamarin.Forms.Core.UnitTests
[Test]
public void TestGetRendererForUnknownSubclass ()
{
- var registrar = new Registrar<MockRenderer> ();
+ var registrar = new Internals.Registrar<MockRenderer> ();
registrar.Register (typeof (View), typeof (MockRenderer));
@@ -110,7 +110,7 @@ namespace Xamarin.Forms.Core.UnitTests
[Test]
public void TestGetRendererWithRegisteredSubclass ()
{
- var registrar = new Registrar<MockRenderer> ();
+ var registrar = new Internals.Registrar<MockRenderer> ();
registrar.Register (typeof (View), typeof (MockRenderer));
registrar.Register (typeof (Button), typeof (ButtonMockRenderer));
@@ -126,7 +126,7 @@ namespace Xamarin.Forms.Core.UnitTests
[Test]
public void TestReplaceRenderer ()
{
- var registrar = new Registrar<MockRenderer> ();
+ var registrar = new Internals.Registrar<MockRenderer> ();
registrar.Register (typeof (View), typeof (MockRenderer));
registrar.Register (typeof (Button), typeof (ButtonMockRenderer));
@@ -140,7 +140,7 @@ namespace Xamarin.Forms.Core.UnitTests
[Test]
public void GetHandlerType()
{
- var registrar = new Registrar<MockRenderer>();
+ var registrar = new Internals.Registrar<MockRenderer>();
registrar.Register (typeof (View), typeof (MockRenderer));
Assert.AreEqual (typeof (MockRenderer), registrar.GetHandlerType (typeof (View)));
diff --git a/Xamarin.Forms.Core.UnitTests/RelativeLayoutTests.cs b/Xamarin.Forms.Core.UnitTests/RelativeLayoutTests.cs
index fdbcdfc..c35a6d0 100644
--- a/Xamarin.Forms.Core.UnitTests/RelativeLayoutTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/RelativeLayoutTests.cs
@@ -5,6 +5,7 @@ using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/ResourceDictionaryTests.cs b/Xamarin.Forms.Core.UnitTests/ResourceDictionaryTests.cs
index 9a2c6f0..3621d95 100644
--- a/Xamarin.Forms.Core.UnitTests/ResourceDictionaryTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/ResourceDictionaryTests.cs
@@ -2,6 +2,7 @@
using System.Linq;
using NUnit.Framework;
using System.Collections.Generic;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/TableModelTests.cs b/Xamarin.Forms.Core.UnitTests/TableModelTests.cs
index 9173d38..c4121de 100644
--- a/Xamarin.Forms.Core.UnitTests/TableModelTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/TableModelTests.cs
@@ -1,6 +1,6 @@
using System;
using NUnit.Framework;
-
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/TemplatedItemsListTests.cs b/Xamarin.Forms.Core.UnitTests/TemplatedItemsListTests.cs
index d723b66..4cac940 100644
--- a/Xamarin.Forms.Core.UnitTests/TemplatedItemsListTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/TemplatedItemsListTests.cs
@@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using NUnit.Framework;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{
diff --git a/Xamarin.Forms.Core.UnitTests/UnitPlatform.cs b/Xamarin.Forms.Core.UnitTests/UnitPlatform.cs
index 1d78a7b..401beae 100644
--- a/Xamarin.Forms.Core.UnitTests/UnitPlatform.cs
+++ b/Xamarin.Forms.Core.UnitTests/UnitPlatform.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Core.UnitTests
{