<commit_before>﻿// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

namespace Microsoft.WindowsAzure.Management.ScenarioTest.StoreTests
{
    using System.Management.Automation;
    using System.Management.Automation.Runspaces;
    using Common;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Microsoft.WindowsAzure.Management.ScenarioTest.Common.CustomPowerShell;
    using Microsoft.WindowsAzure.Management.Store.Model;

    [TestClass]
    public class StoreTests : WindowsAzurePowerShellTest
    {
        public static string StoreCredentialFile = "store.publishsettings";

        public static string StoreSubscriptionName = "Store";

        private CustomHost customHost;

        public StoreTests()
            : base("Store\\StoreTests.ps1")
        {
            customHost = new CustomHost();
        }

        [TestInitialize]
        public override void TestSetup()
        {
            base.TestSetup();
            customHost = new CustomHost();
        }

        private void PromptSetup(int choice)
        {
            customHost.CustomUI.PromptChoice = choice;
            powershell.Runspace = RunspaceFactory.CreateRunspace(customHost);
            powershell.Runspace.Open();
            powershell.ImportCredentials(StoreCredentialFile);
            powershell.AddScript(string.Format("Set-AzureSubscription -Default {0}", StoreSubscriptionName));
        }

        #region Get-AzureStoreAvailableAddOn Scenario Tests

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestWithInvalidCredentialsWorks()
        {
            RunPowerShellTest("Test-WithInvalidCredentialsWorks");
        }

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestGetAzureStoreAvailableAddOnWithDefaultCountry()
        {
            RunPowerShellTest("Test-GetAzureStoreAvailableAddOnWithDefaultCountry");
        }

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestGetAzureStoreAvailableAddOnWithNoAddOns()
        {
            RunPowerShellTest("Test-GetAzureStoreAvailableAddOnWithNoAddOns");
        }

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestGetAzureStoreAvailableAddOnWithInvalidCountryName()
        {
            RunPowerShellTest("Test-GetAzureStoreAvailableAddOnWithInvalidCountryName");
        }

        #endregion

        #region Get-AzureStoreAddOn Scneario Tests

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestGetAzureStoreAddOnWithInvalidCredentials()
        {
            RunPowerShellTest("Test-WithInvalidCredentials { Get-AzureStoreAddOn }");
        }

        #endregion
    }
}<commit_msg>Change test to be on New<commit_after>﻿// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

namespace Microsoft.WindowsAzure.Management.ScenarioTest.StoreTests
{
    using System.Management.Automation;
    using System.Management.Automation.Runspaces;
    using Common;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Microsoft.WindowsAzure.Management.ScenarioTest.Common.CustomPowerShell;
    using Microsoft.WindowsAzure.Management.Store.Model;

    [TestClass]
    public class StoreTests : WindowsAzurePowerShellTest
    {
        public static string StoreCredentialFile = "store.publishsettings";

        public static string StoreSubscriptionName = "Store";

        private CustomHost customHost;

        public StoreTests()
            : base("Store\\StoreTests.ps1")
        {
            customHost = new CustomHost();
        }

        [TestInitialize]
        public override void TestSetup()
        {
            base.TestSetup();
            customHost = new CustomHost();
        }

        private void PromptSetup(int choice)
        {
            customHost.CustomUI.PromptChoice = choice;
            powershell.Runspace = RunspaceFactory.CreateRunspace(customHost);
            powershell.Runspace.Open();
            powershell.ImportCredentials(StoreCredentialFile);
            powershell.AddScript(string.Format("Set-AzureSubscription -Default {0}", StoreSubscriptionName));
        }

        #region Get-AzureStoreAvailableAddOn Scenario Tests

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestWithInvalidCredentialsWorks()
        {
            RunPowerShellTest("Test-WithInvalidCredentialsWorks");
        }

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestGetAzureStoreAvailableAddOnWithDefaultCountry()
        {
            RunPowerShellTest("Test-GetAzureStoreAvailableAddOnWithDefaultCountry");
        }

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestGetAzureStoreAvailableAddOnWithNoAddOns()
        {
            RunPowerShellTest("Test-GetAzureStoreAvailableAddOnWithNoAddOns");
        }

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestGetAzureStoreAvailableAddOnWithInvalidCountryName()
        {
            RunPowerShellTest("Test-GetAzureStoreAvailableAddOnWithInvalidCountryName");
        }

        #endregion

        #region Get-AzureStoreAddOn Scneario Tests

        [TestMethod]
        [TestCategory(Category.All)]
        [TestCategory(Category.Store)]
        public void TestNewAzureStoreAddOnWithInvalidCredentials()
        {
            RunPowerShellTest("Test-WithInvalidCredentials { New-AzureStoreAddOn Name AddOnPlan Location}");
        }

        #endregion
    }
}
{'fraction_non_alphanumeric': 0.12334801762114538, 'fraction_numerical': 0.0016519823788546256, 'mean_word_length': 2.3234217749313815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6649719', 'n_tokens_mistral': 1715, 'n_tokens_neox': 1695, 'n_words': 386}