summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.UnitTests
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-04-25 10:52:48 -0600
committerRui Marinho <me@ruimarinho.net>2016-04-25 12:52:48 -0400
commit07df05ced2b43446c84d47f4b7a8325abcd0f767 (patch)
tree21ac508248e24266a884f9bf0fc28acadf7978fc /Xamarin.Forms.Core.UnitTests
parent6c0c11960b26c4ccb3322fec04e0eb6f55d9da07 (diff)
downloadxamarin-forms-07df05ced2b43446c84d47f4b7a8325abcd0f767.tar.gz
xamarin-forms-07df05ced2b43446c84d47f4b7a8325abcd0f767.tar.bz2
xamarin-forms-07df05ced2b43446c84d47f4b7a8325abcd0f767.zip
Remove ToolBar from Core; Remove ToolBar renderers and unit tests (#124)
Diffstat (limited to 'Xamarin.Forms.Core.UnitTests')
-rw-r--r--Xamarin.Forms.Core.UnitTests/ToolbarUnitTests.cs144
-rw-r--r--Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj1
2 files changed, 0 insertions, 145 deletions
diff --git a/Xamarin.Forms.Core.UnitTests/ToolbarUnitTests.cs b/Xamarin.Forms.Core.UnitTests/ToolbarUnitTests.cs
deleted file mode 100644
index efe07ebf..00000000
--- a/Xamarin.Forms.Core.UnitTests/ToolbarUnitTests.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-using NUnit.Framework;
-
-namespace Xamarin.Forms.Core.UnitTests
-{
- [TestFixture]
- public class ToolbarUnitTests : BaseTestFixture
- {
- [Test]
- public void TestConstructor ()
- {
- Toolbar toolbar = new Toolbar ();
-
- Assert.That (toolbar.Items, Is.Empty);
- }
-
- [Test]
- public void TestAdd ()
- {
- Toolbar toolbar = new Toolbar ();
-
- ToolbarItem item = new ToolbarItem ("Foo", "Bar.jpg", () => {});
- toolbar.Add (item);
-
- Assert.AreEqual (item, toolbar.Items [0]);
- }
-
- [Test]
- public void TestRemove ()
- {
- Toolbar toolbar = new Toolbar ();
-
- ToolbarItem item = new ToolbarItem ("Foo", "Bar.jpg", () => {});
- ToolbarItem item2 = new ToolbarItem ("Foo", "Bar.jpg", () => {});
- toolbar.Add (item);
- toolbar.Add (item2);
-
- toolbar.Remove (item);
-
- Assert.AreEqual (item2, toolbar.Items [0]);
- }
-
- [Test]
- public void TestItemAdded ()
- {
- Toolbar toolbar = new Toolbar ();
-
- ToolbarItem item = new ToolbarItem ("Foo", "Bar.jpg", () => {});
-
- bool added = false;
- toolbar.ItemAdded += (sender, e) => added = true;
-
- toolbar.Add (item);
-
- Assert.True (added);
-
- added = false;
- toolbar.Add (item);
-
- Assert.False (added);
- }
-
- [Test]
- public void TestItemRemoved ()
- {
- Toolbar toolbar = new Toolbar ();
-
- ToolbarItem item = new ToolbarItem ("Foo", "Bar.jpg", () => {});
- toolbar.Add (item);
-
- bool removed = false;
- toolbar.ItemRemoved += (sender, e) => removed = true;
-
- toolbar.Remove (item);
-
- Assert.True (removed);
- }
-
- [Test]
- public void TestClear ()
- {
- var toolbar = new Toolbar ();
-
- var item = new ToolbarItem ("Foo", "Bar.jpg", () => {});
- var item2 = new ToolbarItem ("Foo", "Bar.jpg", () => {});
-
- toolbar.Add (item);
- toolbar.Add (item2);
-
- toolbar.Clear ();
-
- Assert.That (toolbar.Items, Is.Empty);
- }
-
- [Test]
- public void ToolBarItemAddedEventArgs ()
- {
- var toolbar = new Toolbar ();
-
- var item = new ToolbarItem ("Foo", "Bar.jpg", () => { });
- var item2 = new ToolbarItem ("Foo", "Bar.jpg", () => { });
-
- ToolbarItem itemArg = null;
-
- toolbar.ItemAdded += (s, e) => {
- itemArg = e.ToolbarItem;
- };
-
- toolbar.Add (item);
- Assert.AreEqual (item, itemArg);
-
- toolbar.Add (item2);
- Assert.AreEqual (item2, itemArg);
- }
-
- [Test]
- public void ToolBarItemRemovedEventArgs ()
- {
- var toolbar = new Toolbar ();
-
- var item = new ToolbarItem ("Foo", "Bar.jpg", () => { });
- var item2 = new ToolbarItem ("Foo", "Bar.jpg", () => { });
-
- toolbar.Add (item);
- toolbar.Add (item2);
-
- ToolbarItem itemArg = null;
-
- toolbar.ItemRemoved += (s, e) => {
- itemArg = e.ToolbarItem;
- };
-
- toolbar.Remove (item);
- Assert.AreEqual (item, itemArg);
-
- toolbar.Remove (item2);
- Assert.AreEqual (item2, itemArg);
- }
- }
-
-}
diff --git a/Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj b/Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj
index 2609eef6..e8eeaba4 100644
--- a/Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj
+++ b/Xamarin.Forms.Core.UnitTests/Xamarin.Forms.Core.UnitTests.csproj
@@ -149,7 +149,6 @@
<Compile Include="TimePickerUnitTest.cs" />
<Compile Include="ToolbarItemTests.cs" />
<Compile Include="ToolbarTrackerTests.cs" />
- <Compile Include="ToolbarUnitTests.cs" />
<Compile Include="TypeUnitTests.cs" />
<Compile Include="ViewCellTests.cs" />
<Compile Include="ViewUnitTests.cs" />