8000 Correctly check for .NET Core before creating config files. by ivannaranjo · Pull Request #818 · GoogleCloudPlatform/google-cloud-visualstudio · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Correctly check for .NET Core before creating config files.#818

Merged
ivannaranjo merged 2 commits intoGoogleCloudPlatform:masterfrom
ivannaranjo:master_fixing_816
Oct 3, 2017
Merged

Correctly check for .NET Core before creating config files.#818
ivannaranjo merged 2 commits intoGoogleCloudPlatform:masterfrom
ivannaranjo:master_fixing_816

Conversation

@ivannaranjo
Copy link
Contributor
@ivannaranjo ivannaranjo commented Oct 2, 2017

This PR uses the right check to enable/disable the menu item for creating config files to ASP.NET Core apps. The check has been centralized into an extension method so it can be used anywhere we need to check for the ASP.NET Core framework, like the publishing wizard.

Fixed #816

@ivannaranjo ivannaranjo added this to the M2.1-2017 milestone Oct 2, 2017
@ivannaranjo ivannaranjo requested a review from ILMTitan October 2, 2017 13:58
@codecov
Copy link
codecov bot commented Oct 2, 2017

Codecov Report

Merging #818 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #818   +/-   ##
=======================================
  Coverage   11.84%   11.84%           
=======================================
  Files         504      505    +1     
  Lines       12323    12323           
=======================================
  Hits         1460     1460           
  Misses      10863    10863
Impacted Files Coverage Δ
...udExtension.Deployment/IParsedProjectExtensions.cs 0% <0%> (ø)
...Command/GenerateConfigurationContextMenuCommand.cs 20.83% <0%> (ø) ⬆️
...blishDialogSteps/ChoiceStep/ChoiceStepViewModel.cs 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cd69c1...1d31279. Read the comment docs.

Copy link
@ILMTitan ILMTitan left a comment

Choose a reason for hiding this comment

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

Unit tests?

public static bool IsAspNetCoreProject(this IParsedProject project)
=> project.ProjectType == KnownProjectTypes.NetCoreWebApplication1_0 ||
project.ProjectType == KnownProjectTypes.NetCoreWebApplication1_1 ||
project.ProjectType == KnownProjectTypes.NetCoreWebApplication2_0;
Copy link

Choose a reason for hiding this comment

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

Create unit tests for this function? There should be 6 (null project, null ProjectType, invalid ProjectType, and the 3 success cases).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is trivial, the tests are really unnecessary since they will just duplicate the function itself. There's really no logic.

@ivannaranjo ivannaranjo merged commit 3398931 into GoogleCloudPlatform:master Oct 3, 2017
@ivannaranjo ivannaranjo deleted the master_fixing_816 branch October 3, 2017 16:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0