-
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 #162 from nventive/dev/dr/TypeConversion
Add tests for the string to `Type` conversion
- Loading branch information
Showing
6 changed files
with
91 additions
and
10 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/SourceGenerators/XamlGenerationTests/TypeConvertersControl.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,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Windows.UI.Xaml; | ||
|
||
namespace XamlGenerationTests | ||
{ | ||
public partial class TypeConvertersControl : FrameworkElement | ||
{ | ||
public Type TypeProperty { get; set; } | ||
|
||
public Uri UriProperty { get; set; } | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/SourceGenerators/XamlGenerationTests/TypeConvertersTests.xaml
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,22 @@ | ||
<UserControl | ||
x:Class="XamlGenerationTests.TypeConvertersTests" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:uConv="using:Uno.UI.Converters" | ||
xmlns:xamlExpanded="using:Windows.Xaml.UI" | ||
xmlns:ios="http://uno.ui/ios" | ||
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:android="http://uno.ui/android" | ||
xmlns:xamarin="http://uno.ui/xamarin" | ||
xmlns:uloc="http://uno.ui/localization/1.0" | ||
xmlns:local="using:XamlGenerationTests" | ||
mc:Ignorable="d uloc android ios xamarin" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400"> | ||
|
||
<local:TypeConvertersControl | ||
TypeProperty="local:TypeConvertersControl" | ||
UriProperty="https://platform.uno/" /> | ||
</UserControl> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace Uno.UI.Tests.XamlReaderTests | ||
{ | ||
public class TypeConvertersControl : FrameworkElement | ||
{ | ||
public Type TypeProperty { get; set; } | ||
|
||
public Uri UriProperty { get; set; } | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Uno.UI.Tests/XamlReaderTests/When_TypeConverters.xamltest
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,14 @@ | ||
<Page | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" | ||
xmlns:local="using:Uno.UI.Tests.XamlReaderTests" | ||
x:Name="testPage" | ||
mc:Ignorable="d"> | ||
|
||
<local:TypeConvertersControl | ||
TypeProperty="local:TypeConvertersControl" | ||
UriProperty="https://platform.uno/" /> | ||
</Page> |