// ------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version: 17.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ namespace ServiceClientGenerator.Generators.TestFiles { using System.IO; using System.Linq; using System.Text; using System.Collections.Generic; using System; /// /// Class to produce the template output /// #line 1 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] public partial class EndpointDiscoveryMarshallingTests : Generators.BaseGenerator { #line hidden /// /// Create the template output /// public override string TransformText() { #line 7 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" AddLicenseHeader(); #line default #line hidden this.Write("\r\n\r\nusing System;\r\nusing System.IO;\r\nusing System.Text;\r\nusing Microsoft.VisualSt" + "udio.TestTools.UnitTesting;\r\n\r\nusing "); #line 17 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.Namespace)); #line default #line hidden this.Write(";\r\nusing "); #line 18 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.Namespace)); #line default #line hidden this.Write(".Model;\r\nusing "); #line 19 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.Namespace)); #line default #line hidden this.Write(".Model.Internal.MarshallTransformations;\r\nusing Amazon.Runtime.Internal.Transform" + ";\r\n\r\nusing ServiceClientGenerator;\r\n\r\nusing AWSSDK_DotNet35.UnitTests.TestTools;" + "\r\n\r\nnamespace AWSSDK_DotNet35.UnitTests.Marshalling\r\n{\r\n [TestClass]\r\n pub" + "lic class "); #line 29 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.ClassName)); #line default #line hidden this.Write("EndpointDiscoveryMarshallingTests\r\n {\r\n static readonly ServiceModel se" + "rvice_model = Utils.LoadServiceModel(\""); #line 31 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.ServiceDirectoryName)); #line default #line hidden this.Write("\");\r\n"); #line 32 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" foreach(var operation in this.Config.ServiceModel.Operations) { if(!operation.IsEndpointOperation && operation.EndpointDiscoveryEnabled) { #line default #line hidden this.Write(" \r\n [TestMethod]\r\n\t\t[TestCategory(\"UnitTest\")]\r\n\t\t[TestCategory(\"Json\")]\r\n" + "\t\t[TestCategory(\""); #line 42 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.TestCategory)); #line default #line hidden this.Write("\")]\r\n public void "); #line 43 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Name)); #line default #line hidden this.Write("EndpointDiscoveryMarshallTest()\r\n {\r\n var operation = service_m" + "odel.FindOperation(\""); #line 45 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Name)); #line default #line hidden this.Write("\");\r\n var request = InstantiateClassGenerator.Execute<"); #line 46 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Name)); #line default #line hidden this.Write("Request>();\r\n var marshaller = new "); #line 47 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Name)); #line default #line hidden this.Write("EndpointDiscoveryMarshaller();\r\n\r\n var internalData = marshaller.Marsh" + "all(request);\r\n var validator = new EndpointDiscoveryValidator(intern" + "alData, request, service_model, operation);\r\n validator.Validate();\r\n" + " }\r\n"); #line 53 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\TestFiles\EndpointDiscoveryMarshallingTests.tt" } } #line default #line hidden this.Write(" }\r\n}"); return this.GenerationEnvironment.ToString(); } } #line default #line hidden }