Skip to content

Query: Clean up query validation for various negative cases #21344

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 20, 2020

Conversation

smitpatel
Copy link
Contributor

Resolves #15312

@smitpatel smitpatel requested review from maumar and a team June 19, 2020 21:35
Assert.Equal(
CoreStrings.IncludeBadNavigation("Foo", "Gear"),
message);
Assert.Contains("Invalid include path 'Reports.Foo', couldn't find navigation for 'Foo'.", message);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not CoreStrings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning as error. I could not even find CoreString.Method in designer.cs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not there.
There is LoggingDefinitions.LogInvalidIncludePath which returns EventDefinitionsBase
CoreResources.LogInvalidIncludePath which takes IDiagnosticsLogger and returns EventDefinition<object, object>

Copy link
Member

@AndriySvyryd AndriySvyryd Jun 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CoreResources.LogInvalidIncludePath(new TestLogger<TestLoggingDefinitions>()).GenerateMessage("Reports.Foo", "Foo")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smitpatel smitpatel merged commit 973af84 into master Jun 20, 2020
@smitpatel smitpatel deleted the smit/badinclues branch June 20, 2020 01:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QueryRewrite: clean up query validation for various negative cases
2 participants