|
| 1 | +// ---------------------------------------------------------------------------------- |
| 2 | +// |
| 3 | +// Copyright Microsoft Corporation |
| 4 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +// you may not use this file except in compliance with the License. |
| 6 | +// You may obtain a copy of the License at |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// Unless required by applicable law or agreed to in writing, software |
| 9 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +// See the License for the specific language governing permissions and |
| 12 | +// limitations under the License. |
| 13 | +// ---------------------------------------------------------------------------------- |
| 14 | + |
| 15 | +using Microsoft.Azure.Commands.Sql.Database.Cmdlet; |
| 16 | +using Microsoft.Azure.Commands.Sql.Test.Utilities; |
| 17 | +using Microsoft.Azure.ServiceManagement.Common.Models; |
| 18 | +using Microsoft.WindowsAzure.Commands.ScenarioTest; |
| 19 | +using System; |
| 20 | +using Microsoft.Azure.Commands.Sql.Database.Services; |
| 21 | +using Xunit; |
| 22 | +using Xunit.Abstractions; |
| 23 | + |
| 24 | +namespace Microsoft.Azure.Commands.Sql.Test.UnitTests |
| 25 | +{ |
| 26 | + public class AzureSqlDatabaseUnitTests |
| 27 | + { |
| 28 | + public AzureSqlDatabaseUnitTests(ITestOutputHelper output) |
| 29 | + { |
| 30 | + XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output)); |
| 31 | + } |
| 32 | + |
| 33 | + [Fact] |
| 34 | + [Trait(Category.AcceptanceType, Category.CheckIn)] |
| 35 | + public void GetDatabaseSkuName() |
| 36 | + { |
| 37 | + Assert.Equal( |
| 38 | + "Basic", |
| 39 | + AzureSqlDatabaseAdapter.GetDatabaseSkuName("Basic")); |
| 40 | + Assert.Equal( |
| 41 | + "Standard", |
| 42 | + AzureSqlDatabaseAdapter.GetDatabaseSkuName("Standard")); |
| 43 | + Assert.Equal( |
| 44 | + "Premium", |
| 45 | + AzureSqlDatabaseAdapter.GetDatabaseSkuName("Premium")); |
| 46 | + Assert.Equal( |
| 47 | + "DataWarehouse", |
| 48 | + AzureSqlDatabaseAdapter.GetDatabaseSkuName("DataWarehouse")); |
| 49 | + Assert.Equal( |
| 50 | + "Stretch", |
| 51 | + AzureSqlDatabaseAdapter.GetDatabaseSkuName("Stretch")); |
| 52 | + Assert.Equal( |
| 53 | + "GP", |
| 54 | + AzureSqlDatabaseAdapter.GetDatabaseSkuName("GeneralPurpose")); |
| 55 | + Assert.Equal( |
| 56 | + "BC", |
| 57 | + AzureSqlDatabaseAdapter.GetDatabaseSkuName("BusinessCritical")); |
| 58 | + } |
| 59 | + } |
| 60 | +} |
0 commit comments