forked from xamarin/Xamarin.Forms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] Implement the AppIndexProvider on non-AppCompact, fix KeyVa…
…lues on AppLinkEntry (xamarin#166) * [Android] Set AppIndexingProvider on non AppCompact activity * [Core] Fix AppLinkEntry KeyValues
- Loading branch information
Showing
4 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using NUnit.Framework; | ||
|
||
namespace Xamarin.Forms.Core.UnitTests | ||
{ | ||
[TestFixture] | ||
public class AppLinkEntryTests : BaseTestFixture | ||
{ | ||
|
||
[Test] | ||
public void KeyValuesTest() | ||
{ | ||
var entry = new AppLinkEntry(); | ||
|
||
entry.KeyValues.Add("contentType", "GalleryPage"); | ||
entry.KeyValues.Add("companyName", "Xamarin"); | ||
Assert.AreEqual(entry.KeyValues.Count, 2); | ||
} | ||
|
||
|
||
[Test] | ||
public void FromUriTest() | ||
{ | ||
var uri = new Uri("http://foo.com"); | ||
|
||
var entry = AppLinkEntry.FromUri(uri); | ||
|
||
Assert.AreEqual(uri, entry.AppLinkUri); | ||
} | ||
|
||
[Test] | ||
public void ToStringTest() | ||
{ | ||
var str = "http://foo.com"; | ||
var uri = new Uri(str); | ||
|
||
var entry = new AppLinkEntry { AppLinkUri = uri }; | ||
|
||
Assert.AreEqual(uri.ToString(), entry.ToString()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters