-
Notifications
You must be signed in to change notification settings - Fork 747
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4807 from MartinZikmund/dev/mazi/tabview-bitmapicon
fix: Double query of ApiInformation.IsPropertyPresent returns different results
- Loading branch information
Showing
4 changed files
with
38 additions
and
13 deletions.
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
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
24 changes: 24 additions & 0 deletions
24
src/Uno.UI.RuntimeTests/Tests/Windows_Foundation/Metadata/Given_ApiInformation.cs
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,24 @@ | ||
using System.Threading.Tasks; | ||
using Windows.Foundation.Metadata; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace Uno.UI.RuntimeTests.Tests.Windows_Foundation.Metadata | ||
{ | ||
[TestClass] | ||
public class Given_ApiInformation | ||
{ | ||
[TestMethod] | ||
public async Task When_IsPropertyPresent_Called_Twice() | ||
{ | ||
// Verifies fix for issue #4803 | ||
// SharedHelpers called IsPropertyPresent twice for an implemented property | ||
// but the second call resulted in false | ||
|
||
// Application.Current is implemented on all targets | ||
var isPresent = ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Application", "Current"); | ||
Assert.IsTrue(isPresent); | ||
var secondIsPresent = ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Application", "Current"); | ||
Assert.IsTrue(secondIsPresent); | ||
} | ||
} | ||
} |
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