<#@ template language="C#" inherits="Generators.BaseGenerator" #> <#@ assembly name="System.Core" #> <#@ import namespace="System.Linq" #> <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <# AddLicenseHeader(); #> using System.Collections.Generic; using System.IO; using Microsoft.VisualStudio.TestTools.UnitTesting; using <#=this.Config.Namespace#>; using <#=this.Config.Namespace#>.Model; namespace AWSSDK_DotNet35.UnitTests.TestTools { [TestClass] public class <#=this.Config.ClassName#>ConstructorCustomizationsTests { <# foreach (var operation in this.Config.ServiceModel.Operations) { if (this.Config.ServiceModel.Customizations.SimpleConstructorsModel.CreateSimpleConstructors(operation.Name + "Request")) { #> [TestMethod] [TestCategory("UnitTest")] [TestCategory("Constructors"), TestCategory("<#=this.Config.TestCategory#>")] public void <#=operation.Name#>RequestConstructorTests() { <# foreach (var form in this.Config.ServiceModel.Customizations.SimpleConstructorsModel.SimpleConstructors[operation.Name + "Request"].Forms) { var docMembers = this.Config.ServiceModel.Customizations.SimpleConstructorsModel.GetFormMembers(form, this.Config.ServiceModel.FindShape(operation.RequestStructure.Name).Members); #> EnsureConstructorExists(typeof(<#=this.Config.Namespace#>.Model.<#=operation.Name + "Request"#>), new System.Type[] { <# foreach (var member in docMembers) { #>typeof(<#=member.DetermineType()#>), <#}#>}); <# } #> } <# } } #> void EnsureConstructorExists(System.Type type, System.Type[] constructorParams) { Assert.IsNotNull(type.GetConstructor(constructorParams)); } } }