From 6043bcc9a07fd4958ec2bf5a890b032b3c278084 Mon Sep 17 00:00:00 2001 From: TamilarasanSF4853 Date: Wed, 28 May 2025 19:15:00 +0530 Subject: [PATCH 01/12] added test cases --- .../CoreViews/CorePageView.cs | 2 +- .../RadioButton/RadioButtonControlPage.xaml | 104 ++++++ .../RadioButtonControlPage.xaml.cs | 34 ++ .../RadioButton/RadioButtonOptionsPage.xaml | 308 ++++++++++++++++++ .../RadioButtonOptionsPage.xaml.cs | 191 +++++++++++ .../RadioButton/RadioButtonViewModel.cs | 218 +++++++++++++ .../FeatureMatrix/RadioButtonFeatureTests.cs | 257 +++++++++++++++ 7 files changed, 1113 insertions(+), 1 deletion(-) create mode 100644 src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml create mode 100644 src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml.cs create mode 100644 src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonOptionsPage.xaml create mode 100644 src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonOptionsPage.xaml.cs create mode 100644 src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonViewModel.cs create mode 100644 src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/RadioButtonFeatureTests.cs diff --git a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs index ae058bc9bc44..3ca199e661c7 100644 --- a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs +++ b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs @@ -67,6 +67,7 @@ public override string ToString() new GalleryPageFactory(() => new ListViewCoreGalleryPage(), "ListView Gallery"), new GalleryPageFactory(() => new PickerCoreGalleryPage(), "Picker Gallery"), new GalleryPageFactory(() => new ProgressBarCoreGalleryPage(), "Progress Bar Gallery"), + new GalleryPageFactory(() => new RadioButtonControlPage(), "RadioButton Feature Matrix"), new GalleryPageFactory(() => new RadioButtonCoreGalleryPage(), "RadioButton Gallery"), new GalleryPageFactory(() => new ScrollViewCoreGalleryPage(), "ScrollView Gallery"), new GalleryPageFactory(() => new SearchBarCoreGalleryPage(), "Search Bar Gallery"), @@ -79,7 +80,6 @@ public override string ToString() new GalleryPageFactory(() => new SliderControlPage(), "Slider Feature Matrix"), new GalleryPageFactory(() => new CollectionViewFeaturePage(), "CollectionView Feature Matrix"), new GalleryPageFactory(() => new CarouselViewFeaturePage(), "CarouselView Feature Matrix"), - }; public CorePageView(Page rootPage) diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml new file mode 100644 index 000000000000..5f74b4383f93 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml.cs new file mode 100644 index 000000000000..031ecdf6fbbe --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml.cs @@ -0,0 +1,34 @@ +using System; +using Microsoft.Maui.Controls; + +namespace Maui.Controls.Sample +{ + public class RadioButtonControlPage : NavigationPage + { + private RadioButtonViewModel _viewModel; + + public RadioButtonControlPage() + { + _viewModel = new RadioButtonViewModel(); + PushAsync(new RadioButtonControlMainPage(_viewModel)); + } + } + + public partial class RadioButtonControlMainPage : ContentPage + { + private RadioButtonViewModel _viewModel; + + public RadioButtonControlMainPage(RadioButtonViewModel viewModel) + { + InitializeComponent(); + _viewModel = viewModel; + BindingContext = _viewModel; + } + + private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e) + { + BindingContext = _viewModel = new RadioButtonViewModel(); + await Navigation.PushAsync(new RadioButtonOptionsPage(_viewModel)); + } + } +} diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonOptionsPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonOptionsPage.xaml new file mode 100644 index 000000000000..c026e15dd604 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonOptionsPage.xaml @@ -0,0 +1,308 @@ + + + + + + + + + + +