-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mock Data By reflection all Dataset , Locale and methods are shown #3838
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
08065f7
Mock Data By reflection all dataset,locale and methods are shown
prashelke 02ee382
Merge branch 'Releases/Official-Release' into BugFix/MockDataFix
prashelke ffd47ea
Mock Data Review Comment changes
prashelke c00829a
Remove commented Code
prashelke afefd7f
Codacy Issue Resolved
prashelke dbb8143
Updated
prashelke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
24 changes: 24 additions & 0 deletions
24
.../Ginger/UserControlsLib/TextEditor/ValueExpression/ValueExpressionMockDataEditorPage.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,24 @@ | ||
<Page x:Class="Ginger.UserControlsLib.TextEditor.ValueExpression.ValueExpressionMockDataEditorPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:Ginger.UserControlsLib.TextEditor.ValueExpression" | ||
xmlns:GingerCore="clr-namespace:GingerCore;assembly=GingerCore" | ||
mc:Ignorable="d" | ||
d:DesignHeight="300" d:DesignWidth="300" | ||
Title="ValueExpressionMockDataEditorPage"> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="3*"/> | ||
<RowDefinition Height="15*"/> | ||
</Grid.RowDefinitions> | ||
|
||
<Label x:Name="lbl" Grid.Row="0" Style="{StaticResource $LabelStyle}"> | ||
<GingerCore:ucTextDicResource Text="Select Alternative Functions:"/> | ||
</Label> | ||
<ListView x:Name="FunctionsList" Grid.Row="1" Style="{StaticResource $ListBoxStyle}" Foreground="{StaticResource $SelectionColor_Pink}" BorderThickness="0"> | ||
prashelke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
</ListView> | ||
</Grid> | ||
</Page> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New Logic to Handle
{MockDataExp Fun=
ExpressionsThe added logic to handle expressions starting with
{MockDataExp Fun=
is well-integrated within theGetPageFor
method. This method now checks for the specific pattern and, if matched, usesGingerCore.ValueExpression.GetMockDataDatasetsFunction
to parse the expression and create a new instance ofValueExpressionMockDataEditorPage
.GetMockDataDatasetsFunction
method is optimized for performance, especially if it involves complex parsing or external data fetching.Overall, the implementation follows good practices, but it's recommended to add unit tests to cover these new scenarios to ensure stability and correctness.
Would you like me to help in writing unit tests for this new functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prashelke, here are the unit tests for the new functionality handling
{MockDataExp Fun=
expressions in theGetPageFor
method. These tests will help ensure that the method behaves as expected under various scenarios:These tests check for valid input, invalid input, and null input scenarios. Feel free to adjust the test cases or add more to cover additional cases you might be concerned about.