/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ /* * Do not modify this file. This file is generated from the panorama-2019-07-24.normal.json service model. */ using Microsoft.VisualStudio.TestTools.UnitTesting; using Amazon.Runtime; using Amazon.Panorama.Endpoints; using Amazon.Panorama.Internal; namespace AWSSDK_DotNet35.UnitTests.Endpoints { [TestClass] public partial class PanoramaEndpointsTests { [TestMethod] [TestCategory("UnitTest")] [TestCategory("Endpoints")] [TestCategory("Panorama")] [Description("For custom endpoint with fips disabled and dualstack disabled")] public void For_custom_endpoint_with_fips_disabled_and_dualstack_disabled_Test() { var parameters = new PanoramaEndpointParameters(); parameters["UseDualStack"] = false; parameters["Region"] = "us-east-1"; parameters["UseFIPS"] = false; parameters["Endpoint"] = "https://example.com"; var endpoint = new AmazonPanoramaEndpointProvider().ResolveEndpoint(parameters); Assert.AreEqual("https://example.com", endpoint.URL); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Endpoints")] [TestCategory("Panorama")] [Description("For custom endpoint with fips enabled and dualstack disabled")] [ExpectedException(typeof(AmazonClientException), @"Invalid Configuration: FIPS and custom endpoint are not supported")] public void For_custom_endpoint_with_fips_enabled_and_dualstack_disabled_Test() { var parameters = new PanoramaEndpointParameters(); parameters["UseDualStack"] = false; parameters["Region"] = "us-east-1"; parameters["UseFIPS"] = true; parameters["Endpoint"] = "https://example.com"; var endpoint = new AmazonPanoramaEndpointProvider().ResolveEndpoint(parameters); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Endpoints")] [TestCategory("Panorama")] [Description("For custom endpoint with fips disabled and dualstack enabled")] [ExpectedException(typeof(AmazonClientException), @"Invalid Configuration: Dualstack and custom endpoint are not supported")] public void For_custom_endpoint_with_fips_disabled_and_dualstack_enabled_Test() { var parameters = new PanoramaEndpointParameters(); parameters["UseDualStack"] = true; parameters["Region"] = "us-east-1"; parameters["UseFIPS"] = false; parameters["Endpoint"] = "https://example.com"; var endpoint = new AmazonPanoramaEndpointProvider().ResolveEndpoint(parameters); } } }