diff options
author | Rodrigo Moya <rodrigo.moya@xamarin.com> | 2019-11-28 13:19:56 +0300 |
---|---|---|
committer | Rodrigo Moya <rodrigo.moya@xamarin.com> | 2019-11-28 13:19:56 +0300 |
commit | 7c8f86cdff5925901f91d1576c916c0cf1ec81d1 (patch) | |
tree | 276c79a890c293f3f1c715bac0028fb893bf9b7d /main/src/addins/MonoDevelop.DotNetCore | |
parent | 3a7550df0cbc74c9d2e39a54ba0f07150ecdba1e (diff) |
[DotNetCore] Add test for unsupported SDK ignoring in template wizard
Diffstat (limited to 'main/src/addins/MonoDevelop.DotNetCore')
-rw-r--r-- | main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateWizardTests.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateWizardTests.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateWizardTests.cs index 6dec6e10c7..323e7ef068 100644 --- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateWizardTests.cs +++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateWizardTests.cs @@ -24,6 +24,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +using System.Linq; using System.Reflection; using MonoDevelop.Core.StringParsing; using MonoDevelop.DotNetCore.Templating;
@@ -322,6 +323,20 @@ namespace MonoDevelop.DotNetCore.Tests } [Test] + public void NetCoreApp_UnsupportedSDKInstalled_TemplateDoesNotShowUnsupported () + { + CreateWizard (); + DotNetCoreRuntimesInstalled ("2.1.14", "2.2.8", "3.0.1", "3.1.0", $"{DotNetCoreSdk.DotNetCoreUnsupportedTargetFrameworkVersion.Major}.{DotNetCoreSdk.DotNetCoreUnsupportedTargetFrameworkVersion.Minor}.0"); + DotNetCoreSdksInstalled ("2.1.702", "2.2.402", "3.0.101", "3.1.100", $"{DotNetCoreSdk.DotNetCoreUnsupportedTargetFrameworkVersion.Major}.{DotNetCoreSdk.DotNetCoreUnsupportedTargetFrameworkVersion.Minor}.0"); + + int pages = wizard.TotalPages; + + Assert.AreEqual (1, pages); + Assert.AreEqual (4, wizard.TargetFrameworks.Count); + Assert.False (wizard.TargetFrameworks.Any (x => x.Id.IsNetCoreAppOrHigher (DotNetCoreSdk.DotNetCoreUnsupportedTargetFrameworkVersion))); + } + + [Test] public void NetCoreLibrary_NetCore20Installed () { CreateWizard (); |